Skip to content

Commit 7e2703b

Browse files
Update venv activate.bat to escape custom PROMPT variables on Windows (GH-114885)
1 parent c12240e commit 7e2703b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/venv/scripts/nt/activate.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ if not defined PROMPT set PROMPT=$P$G
1515
if defined _OLD_VIRTUAL_PROMPT set PROMPT=%_OLD_VIRTUAL_PROMPT%
1616
if defined _OLD_VIRTUAL_PYTHONHOME set PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%
1717

18-
set _OLD_VIRTUAL_PROMPT=%PROMPT%
19-
set PROMPT=(__VENV_PROMPT__) %PROMPT%
18+
set "_OLD_VIRTUAL_PROMPT=%PROMPT%"
19+
set "PROMPT=(__VENV_PROMPT__) %PROMPT%"
2020

2121
if defined PYTHONHOME set _OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%
2222
set PYTHONHOME=

0 commit comments

Comments
 (0)