From 1b854503515998cda1eec8558a37c435d43190f5 Mon Sep 17 00:00:00 2001 From: j3ska Date: Fri, 8 Mar 2019 13:33:49 -0800 Subject: [PATCH 1/2] 36245: If statements prefer brackets over quotes if it is a filepath that could contain a space. --- PCbuild/get_externals.bat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat index 175a0513e77c25b..3ba985b865caf10 100644 --- a/PCbuild/get_externals.bat +++ b/PCbuild/get_externals.bat @@ -41,7 +41,7 @@ if "%DO_FETCH%"=="false" goto end if "%ORG%"=="" (set ORG=python) call "%PCBUILD%\find_python.bat" "%PYTHON%" -if "%PYTHON%"=="" ( +if [%PYTHON%]==[] ( where /Q git || echo Python 3.6 could not be found or installed, and git.exe is not on your PATH && exit /B 1 ) @@ -60,7 +60,7 @@ set libraries=%libraries% zlib-1.2.11 for %%e in (%libraries%) do ( if exist "%EXTERNALS_DIR%\%%e" ( echo.%%e already exists, skipping. - ) else if "%PYTHON%"=="" ( + ) else if [%PYTHON%]==[] ( echo.Fetching %%e with git... git clone --depth 1 https://github.com/%ORG%/cpython-source-deps --branch %%e "%EXTERNALS_DIR%\%%e" ) else ( @@ -79,7 +79,7 @@ if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06 for %%b in (%binaries%) do ( if exist "%EXTERNALS_DIR%\%%b" ( echo.%%b already exists, skipping. - ) else if "%PYTHON%"=="" ( + ) else if [%PYTHON%]==[] ( echo.Fetching %%b with git... git clone --depth 1 https://github.com/%ORG%/cpython-bin-deps --branch %%b "%EXTERNALS_DIR%\%%b" ) else ( From 70190e4518a4c2c2fa221a9bfaf9c70f4710d3d4 Mon Sep 17 00:00:00 2001 From: Jess Date: Thu, 14 Mar 2019 18:25:20 -0700 Subject: [PATCH 2/2] Update get_externals.bat --- PCbuild/get_externals.bat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat index 3ba985b865caf10..cbeb5a19b55b98a 100644 --- a/PCbuild/get_externals.bat +++ b/PCbuild/get_externals.bat @@ -41,7 +41,7 @@ if "%DO_FETCH%"=="false" goto end if "%ORG%"=="" (set ORG=python) call "%PCBUILD%\find_python.bat" "%PYTHON%" -if [%PYTHON%]==[] ( +if NOT DEFINED PYTHON ( where /Q git || echo Python 3.6 could not be found or installed, and git.exe is not on your PATH && exit /B 1 ) @@ -60,7 +60,7 @@ set libraries=%libraries% zlib-1.2.11 for %%e in (%libraries%) do ( if exist "%EXTERNALS_DIR%\%%e" ( echo.%%e already exists, skipping. - ) else if [%PYTHON%]==[] ( + ) else if NOT DEFINED PYTHON ( echo.Fetching %%e with git... git clone --depth 1 https://github.com/%ORG%/cpython-source-deps --branch %%e "%EXTERNALS_DIR%\%%e" ) else ( @@ -79,7 +79,7 @@ if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06 for %%b in (%binaries%) do ( if exist "%EXTERNALS_DIR%\%%b" ( echo.%%b already exists, skipping. - ) else if [%PYTHON%]==[] ( + ) else if NOT DEFINED PYTHON ( echo.Fetching %%b with git... git clone --depth 1 https://github.com/%ORG%/cpython-bin-deps --branch %%b "%EXTERNALS_DIR%\%%b" ) else (