[Python-checkins] bpo-38344: Fix syntax in activate.bat (GH-16533)

Miss Islington (bot) webhook-mailer at python.org
Mon Oct 7 17:27:01 EDT 2019


https://github.com/python/cpython/commit/4880e5a1b66d9175fcc402cb0288bc1898356831
commit: 4880e5a1b66d9175fcc402cb0288bc1898356831
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-10-07T14:26:57-07:00
summary:

bpo-38344: Fix syntax in activate.bat (GH-16533)

(cherry picked from commit e310af9e2941c2fbb7370e003276cc37eb230f16)

Co-authored-by: James Abel <j at abel.co>

files:
A Misc/NEWS.d/next/Windows/2019-10-05-05-50-58.bpo-38344.scr2LO.rst
M Lib/venv/scripts/nt/activate.bat

diff --git a/Lib/venv/scripts/nt/activate.bat b/Lib/venv/scripts/nt/activate.bat
index 8eb5c1ff664fb..af4c7e0abacb1 100644
--- a/Lib/venv/scripts/nt/activate.bat
+++ b/Lib/venv/scripts/nt/activate.bat
@@ -22,7 +22,7 @@ if defined PYTHONHOME set _OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%
 set PYTHONHOME=
 
 if defined _OLD_VIRTUAL_PATH set PATH=%_OLD_VIRTUAL_PATH%
-else set _OLD_VIRTUAL_PATH=%PATH%
+if not defined _OLD_VIRTUAL_PATH set _OLD_VIRTUAL_PATH=%PATH%
 
 set PATH=%VIRTUAL_ENV%\__VENV_BIN_NAME__;%PATH%
 
diff --git a/Misc/NEWS.d/next/Windows/2019-10-05-05-50-58.bpo-38344.scr2LO.rst b/Misc/NEWS.d/next/Windows/2019-10-05-05-50-58.bpo-38344.scr2LO.rst
new file mode 100644
index 0000000000000..b5854d1ecb0d3
--- /dev/null
+++ b/Misc/NEWS.d/next/Windows/2019-10-05-05-50-58.bpo-38344.scr2LO.rst
@@ -0,0 +1 @@
+Fix error message in activate.bat



More information about the Python-checkins mailing list