Skip to content

Commit f9ec8ae

Browse files
authored
Don't prepend system-wide PATH when installing Python for binary smoke test (#1404)
The PATH has already been set and restored manually in the script
1 parent 29d0c91 commit f9ec8ae

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

windows/internal/smoke_test.bat

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ del python-amd64.exe
4444
curl --retry 3 -kL "%PYTHON_INSTALLER_URL%" --output python-amd64.exe
4545
if errorlevel 1 exit /b 1
4646

47-
start /wait "" python-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0 TargetDir=%CD%\Python
47+
:: According to https://docs.python.org/3/using/windows.html, setting PrependPath to 1 will prepend
48+
:: the installed Python to PATH system-wide. Even calling set PATH=%ORIG_PATH% later on won't make
49+
:: a change. As the builder directory will be removed after the smoke test, all subsequent non-binary
50+
:: jobs will fail to find any Python executable there
51+
start /wait "" python-amd64.exe /quiet InstallAllUsers=1 PrependPath=0 Include_test=0 TargetDir=%CD%\Python
4852
if errorlevel 1 exit /b 1
4953

5054
set "PATH=%CD%\Python%PYTHON_VERSION%\Scripts;%CD%\Python;%PATH%"

0 commit comments

Comments
 (0)