Skip to content

[3.13] gh-125398: Convert paths in venv activate script when using Git Bash under Windows (GH-125399) #125733

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

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Oct 19, 2024

  • 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.
(cherry picked from commit 2a378db)

Co-authored-by: Julien julien@caffeine.lu

… 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants