From 73c80a437cde4ab66b844d5619430f0a88fc6cc8 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Sun, 14 May 2023 03:34:13 -0700 Subject: [PATCH] Don't prepend system-wide PATH when installing Python for binary smoke test The PATH has already been set and restored manually in the script --- windows/internal/smoke_test.bat | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/windows/internal/smoke_test.bat b/windows/internal/smoke_test.bat index 1be7d1744..66d7bb2e1 100644 --- a/windows/internal/smoke_test.bat +++ b/windows/internal/smoke_test.bat @@ -44,7 +44,11 @@ del python-amd64.exe curl --retry 3 -kL "%PYTHON_INSTALLER_URL%" --output python-amd64.exe if errorlevel 1 exit /b 1 -start /wait "" python-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0 TargetDir=%CD%\Python +:: According to https://docs.python.org/3/using/windows.html, setting PrependPath to 1 will prepend +:: the installed Python to PATH system-wide. Even calling set PATH=%ORIG_PATH% later on won't make +:: a change. As the builder directory will be removed after the smoke test, all subsequent non-binary +:: jobs will fail to find any Python executable there +start /wait "" python-amd64.exe /quiet InstallAllUsers=1 PrependPath=0 Include_test=0 TargetDir=%CD%\Python if errorlevel 1 exit /b 1 set "PATH=%CD%\Python%PYTHON_VERSION%\Scripts;%CD%\Python;%PATH%"