瀏覽代碼

[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>
Alexander Schulze 2 年之前
父節點
當前提交
ead9b43bd5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      cipd.bat

+ 1 - 1
cipd.bat

@@ -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%" ^