From: Jeff King Date: Fri, 25 Jul 2025 05:13:09 +0000 (-0400) Subject: t7510: use $PWD instead of $(pwd) inside PATH X-Git-Tag: v2.51.0-rc0~13^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c26ecaf069080c6f9f98925530394a5b4c53e325;p=thirdparty%2Fgit.git 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 71dd50472d (t0021, t5615: use $PWD instead of $(pwd) in PATH-like shell variables, 2016-11-11). Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh index 95d2ebe277..1201c85ba6 100755 --- a/t/t7510-signed-commit.sh +++ b/t/t7510-signed-commit.sh @@ -458,7 +458,7 @@ test_expect_success 'custom `gpg.program`' ' # `gpg.program` does not specify an absolute path, it should find a program in `$PATH` test_config gpg.program "fake-gpg" && - env PATH="$(pwd):$PATH" \ + env PATH="$PWD:$PATH" \ git commit -S --allow-empty -m signed-commit '