git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] t9001: PATH must not use Windows-style paths

From
Johannes Sixt <j6t@kdbg.org>
Date
Aug 24, 2021, 18:01 UTC
Message-ID
<4f5c5633-f5a2-3c99-329e-3057b8d447d2@kdbg.org>

On Windows, $(pwd) returns a drive-letter style path C:/foo, while $PWD contains a POSIX style /c/foo path. When we want to interpolate the current directory in the PATH variable, we must not use the C:/foo style, because the meaning of the colon is ambiguous. Use the POSIX style.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 This belongs on top of branch ga/send-email-sendmail-cmd.
 t/t9001-send-email.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 57fc10e7f8..595cbad372 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -2198,7 +2198,7 @@ test_expect_success $PREREQ 'leading and trailing whitespaces are removed' '
 
 test_expect_success $PREREQ 'test using command name with --sendmail-cmd' '
 	clean_fake_sendmail &&
-	PATH="$(pwd):$PATH" \
+	PATH="$PWD:$PATH" \
 	git send-email \
 		--from="Example <nobody@example.com>" \
 		--to=nobody@example.com \
-- 
2.33.0.129.g739793498e
Next: Johannes Schindelin
Message 1 of 2 in “t9001: PATH must not use Windows-style paths”
  1. t9001: PATH must not use Windows-style pathsJohannes Sixt, Aug 24, 2021
  2. Johannes SchindelinAug 25, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.