Skip to content

Commit 9e43330

Browse files
[3.13] gh-125398: Convert paths in venv activate script when using Git Bash under Windows (GH-125399) (GH-125733)
(cherry picked from commit 2a378db)
1 parent 96db216 commit 9e43330

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Lib/venv/scripts/common/activate

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ deactivate nondestructive
3838

3939
# on Windows, a path can contain colons and backslashes and has to be converted:
4040
case "$(uname)" in
41-
CYGWIN*|MSYS*)
42-
# transform D:\path\to\venv to /d/path/to/venv on MSYS
41+
CYGWIN*|MSYS*|MINGW*)
42+
# transform D:\path\to\venv to /d/path/to/venv on MSYS and MINGW
4343
# and to /cygdrive/d/path/to/venv on Cygwin
4444
VIRTUAL_ENV=$(cygpath "__VENV_DIR__")
4545
export VIRTUAL_ENV
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix the conversion of the :envvar:`!VIRTUAL_ENV` path in the activate script in :mod:`venv` when running in Git Bash for Windows.

0 commit comments

Comments
 (0)