You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Command prompt does not respect VIRTUAL_ENV_DISABLE_PROMPT when activating venv #109940
Confirmed, still present on main: activate.bat sets PROMPT=(...) %PROMPT% unconditionally, with no VIRTUAL_ENV_DISABLE_PROMPT check, so on Windows cmd the prefix is added regardless of the variable. It's the only CPython activator that ignores it — bash/zsh, fish, csh, and Activate.ps1 all gate the prompt on it.
virtualenv's batch activator gates both the prompt save and the prompt change on if not defined VIRTUAL_ENV_DISABLE_PROMPT (activate.bat L21-27). Wrapping the _OLD_VIRTUAL_PROMPT save and the PROMPT= line in the same check would fix it.
Activity
gaborbernat commentedon Jun 5, 2026
Confirmed, still present on
main:activate.batsetsPROMPT=(...) %PROMPT%unconditionally, with noVIRTUAL_ENV_DISABLE_PROMPTcheck, so on Windows cmd the prefix is added regardless of the variable. It's the only CPython activator that ignores it — bash/zsh, fish, csh, andActivate.ps1all gate the prompt on it.virtualenv's batch activator gates both the prompt save and the prompt change on
if not defined VIRTUAL_ENV_DISABLE_PROMPT(activate.bat L21-27). Wrapping the_OLD_VIRTUAL_PROMPTsave and thePROMPT=line in the same check would fix it.pythongh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat
pythongh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat
pythongh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat
gh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat (GH-151215
[3.15] gh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat (G…
[3.13] gh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat (G…
[3.14] gh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat (G…
pythongh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat (p…