]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-125398: Convert paths in venv activate script when using Git Bash under...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 19 Oct 2024 18:00:07 +0000 (20:00 +0200)
committerGitHub <noreply@github.com>
Sat, 19 Oct 2024 18:00:07 +0000 (19:00 +0100)
(cherry picked from commit 2a378dba987e125521b678364f0cd44b92dd5d52)

Lib/venv/scripts/common/activate
Misc/NEWS.d/next/Library/2024-10-13-15-04-58.gh-issue-125398.UW7Ndv.rst [new file with mode: 0644]

index 4593799b7e9b0ea7185024de93146161d0ca3c9a..44f137672e9d2e4faf82fb1c69daf828e1039556 100644 (file)
@@ -38,8 +38,8 @@ deactivate nondestructive
 
 # on Windows, a path can contain colons and backslashes and has to be converted:
 case "$(uname)" in
-    CYGWIN*|MSYS*)
-        # transform D:\path\to\venv to /d/path/to/venv on MSYS
+    CYGWIN*|MSYS*|MINGW*)
+        # transform D:\path\to\venv to /d/path/to/venv on MSYS and MINGW
         # and to /cygdrive/d/path/to/venv on Cygwin
         VIRTUAL_ENV=$(cygpath "__VENV_DIR__")
         export VIRTUAL_ENV
diff --git a/Misc/NEWS.d/next/Library/2024-10-13-15-04-58.gh-issue-125398.UW7Ndv.rst b/Misc/NEWS.d/next/Library/2024-10-13-15-04-58.gh-issue-125398.UW7Ndv.rst
new file mode 100644 (file)
index 0000000..a188b35
--- /dev/null
@@ -0,0 +1 @@
+Fix the conversion of the :envvar:`!VIRTUAL_ENV` path in the activate script in :mod:`venv` when running in Git Bash for Windows.