gh-107814: Avoid output from Nuget installation in find_python.bat (GH-107815)

This commit is contained in:
Max Bachmann 2023-08-10 00:42:16 +02:00 committed by GitHub
parent 326f0ba1c5
commit 1e229e2c3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -0,0 +1 @@
When calling ``find_python.bat`` with ``-q`` it did not properly silence the output of nuget. That is now fixed.

View File

@ -52,7 +52,7 @@
@if "%_Py_NUGET%"=="" (set _Py_NUGET=%_Py_EXTERNALS_DIR%\nuget.exe)
@if "%_Py_NUGET_URL%"=="" (set _Py_NUGET_URL=https://aka.ms/nugetclidl)
@if NOT exist "%_Py_NUGET%" (
@echo Downloading nuget...
@if not "%_Py_Quiet%"=="1" @echo Downloading nuget...
@rem NB: Must use single quotes around NUGET here, NOT double!
@rem Otherwise, a space in the path would break things
@rem If it fails, retry with any available copy of Python
@ -63,7 +63,11 @@
)
@if not "%_Py_Quiet%"=="1" @echo Installing Python via nuget...
@"%_Py_NUGET%" install pythonx86 -ExcludeVersion -OutputDirectory "%_Py_EXTERNALS_DIR%"
@if not "%_Py_Quiet%"=="1" (
@"%_Py_NUGET%" install pythonx86 -ExcludeVersion -OutputDirectory "%_Py_EXTERNALS_DIR%"
) else (
@"%_Py_NUGET%" install pythonx86 -Verbosity quiet -ExcludeVersion -OutputDirectory "%_Py_EXTERNALS_DIR%"
)
@rem Quote it here; it's not quoted later because "py -x.y" wouldn't work
@if not errorlevel 1 (set PYTHON="%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe") & (set _Py_Python_Source=found on nuget.org) & goto :found