Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

venv: Activation in fish inside msys2 (or similar) breaks PATH #151042

Copy link
Copy link
@LuNoX

Description

@LuNoX
Issue body actions

Bug report

Bug description:

When running source .venv/Scripts/activate.fish on windows from a fish shell inside msys2 ucrt64 it breaks the PATH.
Equivalently to gh-103325 activating a venv inside fish (from Cygwin, MSYS or MinGW) on windows will lead to mixing Unix and Windows path styles which then has knockon effects like breaking the PATH when

set -gx PATH "$VIRTUAL_ENV/"__VENV_BIN_NAME__ $PATH
runs.

To reproduce:

  • Boot a Windows partition
  • Install Cygwin, MSYS2, MinGW or equivalent
  • Install fish from inside Cygwin, MSYS2, MinGW or equivalent
  • Install python
  • cd into a python project of your choice
  • Run your installed python's venv command
  • Run echo $PATH
  • Run source .venv/Scripts/activate.fish
  • Run echo $PATH

Notice that the second PATH output contains a new broken/mismatched entry at the start which will in turn break all future uses of PATH.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Windows

Linked PRs

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-venvRelated to the venv moduleRelated to the venv moduletype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.