Skip to content

The virtualenv activate script does not correctly detect the Windows Git Bash shell #125398

Closed

Description

@julienp

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 like D:\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 reports msys in Git Bash for Windows, however uname returns MINGW....

This is a regression in Python 3.13.0

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Linked PRs

Activity

  1. added
    topic-venvRelated to the venv module
    stdlibStandard Library Python modules in the Lib/ directory
    on Oct 13, 2024
  2. added a commit that references this issue on Oct 14, 2024
  3. added a commit that references this issue on Oct 19, 2024
  4. added a commit that references this issue on Oct 19, 2024
  5. added a commit that references this issue on Oct 19, 2024
  6. y5c4l3 commented on Oct 21, 2024

    @y5c4l3
    Contributor

    uname -o seems a more semantic and stable candidate for MSYS2 detection, as well as Cygwin. Since it's merged already, I'll leave the outputs here only for reference.

    image
    image

  7. added a commit that references this issue on Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-venvRelated to the venv moduletype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions