Skip to content

Commit 1364334

Browse files
AndyAtTibyermulnik
andauthored
fixup! fix(docker): wdirgitindex from git rev-parse --git-dir
Co-authored-by: George L. Yermulnik <yz@yz.kiev.ua>
1 parent 3c9551b commit 1364334

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tools/entrypoint.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ wdir="$(pwd)"
3939
if ! su-exec "$USERID" "$BASHPATH" -c "test -w $wdir && test -r $wdir"; then
4040
echo_error_and_exit "uid:gid $USERID lacks permissions to $wdir/"
4141
fi
42-
wdirgitdir="$(git rev-parse --git-dir)" || echo_error_and_exit "Cannot determine Git directory"
43-
wdirgitindex="${wdirgitdir}/index"
42+
wdirgitindex="$(git rev-parse --git-dir 2>&1)/index" || echo_error_and_exit "${wdirgitindex%/index}"
4443
if ! su-exec "$USERID" "$BASHPATH" -c "test -w $wdirgitindex && test -r $wdirgitindex"; then
4544
echo_error_and_exit "uid:gid $USERID cannot write to $wdirgitindex"
4645
fi

0 commit comments

Comments
 (0)