We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c9551b commit 1364334Copy full SHA for 1364334
tools/entrypoint.sh
@@ -39,8 +39,7 @@ wdir="$(pwd)"
39
if ! su-exec "$USERID" "$BASHPATH" -c "test -w $wdir && test -r $wdir"; then
40
echo_error_and_exit "uid:gid $USERID lacks permissions to $wdir/"
41
fi
42
-wdirgitdir="$(git rev-parse --git-dir)" || echo_error_and_exit "Cannot determine Git directory"
43
-wdirgitindex="${wdirgitdir}/index"
+wdirgitindex="$(git rev-parse --git-dir 2>&1)/index" || echo_error_and_exit "${wdirgitindex%/index}"
44
if ! su-exec "$USERID" "$BASHPATH" -c "test -w $wdirgitindex && test -r $wdirgitindex"; then
45
echo_error_and_exit "uid:gid $USERID cannot write to $wdirgitindex"
46
0 commit comments