-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
The virtualenv activate script does not correctly detect the Windows Git Bash shell #125398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
stdlib
Python modules in the Lib dir
topic-venv
Related to the venv module
type-bug
An unexpected behavior, bug, or error
Comments
This was referenced Oct 13, 2024
github-merge-queue bot
pushed a commit
to pulumi/pulumi
that referenced
this issue
Oct 14, 2024
Run 3.13 in CI Debugpy now supports 3.13 https://github.com/microsoft/debugpy/releases/tag/v1.8.7 There's an issue with virtualenvs when running in Git Bash for Windows python/cpython#125398, we have a workaround for the impacted tests. Ref #17484
vsajip
pushed a commit
that referenced
this issue
Oct 19, 2024
…under Windows (GH-125399) * Convert paths in venv activate script when using Git Bash under Windows With #112508 the check to converts paths when running on Windows was changed from using the non-posix environment variable `$OSTYPE` to using `uname` instead. However this missed the fact that when running under Git Bash on Windows, uname reports `MINGW*` (`$OSTYPE` is still `msys`). This results in `$PATH` being set to something like `D:\a\github-actions-shells\github-actions-shells\venv/Scripts:…`, instead of `/d/a/github-actions-shells/github-actions-shells/venv/Scripts`. Notably, the Git Bash is the bash shell that’s used for GitHub Actions Windows runners, and ships with VSCode.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 19, 2024
… Bash under Windows (pythonGH-125399) * Convert paths in venv activate script when using Git Bash under Windows With python#112508 the check to converts paths when running on Windows was changed from using the non-posix environment variable `$OSTYPE` to using `uname` instead. However this missed the fact that when running under Git Bash on Windows, uname reports `MINGW*` (`$OSTYPE` is still `msys`). This results in `$PATH` being set to something like `D:\a\github-actions-shells\github-actions-shells\venv/Scripts:…`, instead of `/d/a/github-actions-shells/github-actions-shells/venv/Scripts`. Notably, the Git Bash is the bash shell that’s used for GitHub Actions Windows runners, and ships with VSCode. (cherry picked from commit 2a378db) Co-authored-by: Julien <julien@caffeine.lu>
vsajip
pushed a commit
that referenced
this issue
Oct 19, 2024
ebonnal
pushed a commit
to ebonnal/cpython
that referenced
this issue
Jan 12, 2025
… Bash under Windows (pythonGH-125399) * Convert paths in venv activate script when using Git Bash under Windows With python#112508 the check to converts paths when running on Windows was changed from using the non-posix environment variable `$OSTYPE` to using `uname` instead. However this missed the fact that when running under Git Bash on Windows, uname reports `MINGW*` (`$OSTYPE` is still `msys`). This results in `$PATH` being set to something like `D:\a\github-actions-shells\github-actions-shells\venv/Scripts:…`, instead of `/d/a/github-actions-shells/github-actions-shells/venv/Scripts`. Notably, the Git Bash is the bash shell that’s used for GitHub Actions Windows runners, and ships with VSCode.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
stdlib
Python modules in the Lib dir
topic-venv
Related to the venv module
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
When using the virtualenv activate script in Git Bash for Windows, the environment is not correctly detected and paths are not converted.
This results in
$PATH
being set to something likeD:\a\github-actions-shells\github-actions-shells\venv/Scripts:...
, instead of/d/a/github-actions-shells/github-actions-shells/venv/Scripts
.Prior to #112508, the detection used
$OSTYPE
, which reportsmsys
in Git Bash for Windows, howeveruname
returnsMINGW...
.This is a regression in Python 3.13.0
CPython versions tested on:
3.13
Operating systems tested on:
Windows
Linked PRs
The text was updated successfully, but these errors were encountered: