Summary
When running source .venv/Scripts/activate.fish on windows from a fish shell inside msys2 ucrt64 it breaks the PATH.
Equivalently to
|
VIRTUAL_ENV=$(cygpath -u "$VIRTUAL_ENV") |
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"'/{{ 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 uv
- cd into a python project of your choice
- Run
uv venv
- 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.
Platform
Windows 11 x86_64
Version
uv 0.11.14 (3fdfdc7 2026-05-12 x86_64-pc-windows-msvc)
Python version
Python 3.13.5
Summary
When running
source .venv/Scripts/activate.fishon windows from a fish shell inside msys2 ucrt64 it breaks the PATH.Equivalently to
uv/crates/uv-virtualenv/src/activator/activate
Line 83 in 1cdabfb
uv/crates/uv-virtualenv/src/activator/activate.fish
Line 90 in 1cdabfb
To reproduce:
uv venvecho $PATHsource .venv/Scripts/activate.fishecho $PATHNotice that the second PATH output contains a new broken/mismatched entry at the start which will in turn break all future uses of PATH.
Platform
Windows 11 x86_64
Version
uv 0.11.14 (3fdfdc7 2026-05-12 x86_64-pc-windows-msvc)
Python version
Python 3.13.5