8000 gh-107814: Avoid output from Nuget installation in find_python.bat (G… · python/cpython@1e229e2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e229e2

Browse files
authored
gh-107814: Avoid output from Nuget installation in find_python.bat (GH-107815)
1 parent 326f0ba commit 1e229e2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
When calling ``find_python.bat`` with ``-q`` it did not properly silence the output of nuget. That is now fixed.

PCbuild/find_python.bat

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
@if "%_Py_NUGET%"=="" (set _Py_NUGET=%_Py_EXTERNALS_DIR%\nuget.exe)
5353
@if "%_Py_NUGET_URL%"=="" (set _Py_NUGET_URL=https://aka.ms/nugetclidl)
5454
@if NOT exist "%_Py_NUGET%" (
55-
@echo Downloading nuget...
55+
@if not "%_Py_Quiet%"=="1" @echo Downloading nuget...
5656
@rem NB: Must use single quotes around NUGET here, NOT double!
5757
@rem Otherwise, a space in the path would break things
5858
@rem If it fails, retry with any available copy of Python
@@ -63,7 +63,11 @@
6363
)
6464

6565
@if not "%_Py_Quiet%"=="1" @echo Installing Python via nuget...
66-
@"%_Py_NUGET%" install pythonx86 -ExcludeVersion -OutputDirectory "%_Py_EXTERNALS_DIR%"
66+
@if not "%_Py_Quiet%"=="1" (
67+
@"%_Py_NUGET%" install pythonx86 -ExcludeVersion -OutputDirectory "%_Py_EXTERNALS_DIR%"
68+
) else (
69+
@"%_Py_NUGET%" install pythonx86 -Verbosity quiet -ExcludeVersion -OutputDirectory "%_Py_EXTERNALS_DIR%"
70+
)
6771
@rem Quote it here; it's not quoted later because "py -x.y" wouldn't work
6872
@if not errorlevel 1 (set PYTHON="%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe") & (set _Py_Python_Source=found on nuget.org) & goto :found
6973

0 commit comments

Comments
 (0)
0