Skip to content

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

@LuNoX

Description

@LuNoX

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
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