]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-151042: venv: Pass VIRTUAL_ENV through cygpath inside fish on Windows (GH-151043)
authorLuNoX <maillunox@gmail.com>
Mon, 22 Jun 2026 04:21:00 +0000 (06:21 +0200)
committerGitHub <noreply@github.com>
Mon, 22 Jun 2026 04:21:00 +0000 (05:21 +0100)
Lib/venv/scripts/common/activate.fish
Misc/NEWS.d/next/Library/2026-06-07-13-47-05.gh-issue-151042.NMdzF2.rst [new file with mode: 0644]

index 284a7469c99b5769215de855d7dc80d63a1ba874..e8225f6db5b5657f41306be3821a1d58ba978177 100644 (file)
@@ -34,6 +34,9 @@ end
 deactivate nondestructive
 
 set -gx VIRTUAL_ENV __VENV_DIR__
+if string match -qr 'CYGWIN|MSYS|MINGW' (uname)
+    set -gx VIRTUAL_ENV (cygpath -u $VIRTUAL_ENV)
+end
 
 set -gx _OLD_VIRTUAL_PATH $PATH
 set -gx PATH "$VIRTUAL_ENV/"__VENV_BIN_NAME__ $PATH
diff --git a/Misc/NEWS.d/next/Library/2026-06-07-13-47-05.gh-issue-151042.NMdzF2.rst b/Misc/NEWS.d/next/Library/2026-06-07-13-47-05.gh-issue-151042.NMdzF2.rst
new file mode 100644 (file)
index 0000000..a24a15c
--- /dev/null
@@ -0,0 +1 @@
+Fixed venv exporting mixed path styles to PATH on Windows inside fish (via Cygwin, MinGW or MSYS2)