[cipd] Run cipd_impl.ps1 in constrained language mode

The script downloads the current cipd version from [1], and exposes
functions, variables and aliases into the session (dot-sourcing). This
is unnecessary and prevents the system from running in
ConstrainedLanguage mode.

The change runs the powershell script in script scope only to support
the ConstrainedLanguage mode.

[1] https://chrome-infra-packages.appspot.com/client

Bug: 1442051
Change-Id: I249396714ab41b7f5a5edb96f3146904b4e876f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4507036
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Auto-Submit: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
changes/36/4507036/8
Alexander Schulze 2 years ago committed by LUCI CQ
parent 860de3276e
commit ead9b43bd5

@ -77,7 +77,7 @@ exit /b %EXPORT_ERRORLEVEL%
:: in the file's properties dialog.
echo.>"%~dp0.cipd_impl.ps1:Zone.Identifier"
powershell -NoProfile -ExecutionPolicy RemoteSigned ^
-File "%~dp0.cipd_impl.ps1" ^
"%~dp0.cipd_impl.ps1" ^
-CipdBinary "%CIPD_BINARY%" ^
-Platform "%CIPD_PLATFORM%" ^
-BackendURL "%CIPD_BACKEND%" ^

Loading…
Cancel
Save