diff --git a/bootstrap/win_tools.bat b/bootstrap/win_tools.bat index fd1fc0e75..9ac8fcd0d 100644 --- a/bootstrap/win_tools.bat +++ b/bootstrap/win_tools.bat @@ -33,7 +33,7 @@ if not exist "%BOOTSTRAP_ROOT_DIR%\.bleeding_edge" ( :: This method requires EnableDelayedExpansion, and extracts the Python version :: from our CIPD manifest. Variables referenced using "!" instead of "%" are :: delayed expansion variables. -for /F "tokens=*" %%A in (%~dp0%CIPD_MANIFEST%) do ( +for /F "usebackq tokens=*" %%A in ("%~dp0%CIPD_MANIFEST%") do ( set LINE=%%A if not "x!LINE:cpython/=!" == "x!LINE!" set PYTHON_VERSION=!LINE:*version:=! if not "x!LINE:cpython3/=!" == "x!LINE!" set PYTHON3_VERSION=!LINE:*version:=! diff --git a/cipd.bat b/cipd.bat index ddf465e4f..e0312921e 100644 --- a/cipd.bat +++ b/cipd.bat @@ -6,10 +6,10 @@ setlocal set CIPD_BACKEND=https://chrome-infra-packages.appspot.com -set VERSION_FILE="%~dp0cipd_client_version" -set CIPD_BINARY="%~dp0.cipd_client.exe" +set VERSION_FILE=%~dp0cipd_client_version +set CIPD_BINARY=%~dp0.cipd_client.exe -if not exist %CIPD_BINARY% ( +if not exist "%CIPD_BINARY%" ( call :CLEAN_BOOTSTRAP goto :EXEC_CIPD ) @@ -46,9 +46,9 @@ exit /b %EXPORT_ERRORLEVEL% :: and unzipping the depot_tools.zip distribution, we clear the Zone.Identifier :: alternate data stream. This is equivalent to clicking the "Unblock" button :: in the file's properties dialog. -echo.>%~dp0.cipd_impl.ps1:Zone.Identifier +echo.>"%~dp0.cipd_impl.ps1:Zone.Identifier" powershell -NoProfile -ExecutionPolicy RemoteSigned ^ - -Command "%~dp0.cipd_impl.ps1" ^ + -File "%~dp0.cipd_impl.ps1" ^ -CipdBinary "%CIPD_BINARY%" ^ -BackendURL "%CIPD_BACKEND%" ^ -VersionFile "%VERSION_FILE%" ^