Skip to content

Commit c26ecaf

Browse files
peffgitster
authored andcommitted
t7510: use $PWD instead of $(pwd) inside PATH
On Windows, $(pwd) will give us a Windows-style path like "D:/foo". Putting that into $PATH confuses anybody parsing that variable, since colon is a separator character in $PATH. Instead, we should use the Unix-style value we get from $PWD ("/d/foo"). This is similar to the cases fixed by 71dd504 (t0021, t5615: use $PWD instead of $(pwd) in PATH-like shell variables, 2016-11-11). Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 26ef887 commit c26ecaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t7510-signed-commit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ test_expect_success 'custom `gpg.program`' '
458458
459459
# `gpg.program` does not specify an absolute path, it should find a program in `$PATH`
460460
test_config gpg.program "fake-gpg" &&
461-
env PATH="$(pwd):$PATH" \
461+
env PATH="$PWD:$PATH" \
462462
git commit -S --allow-empty -m signed-commit
463463
'
464464

0 commit comments

Comments
 (0)