Unverified Commit 1f85497e authored by 0x574859's avatar 0x574859 Committed by GitHub

[flutter_tools] Add the NoProfile parameter to the PowerShell execution statement (#120786)

Use the NoProfile parameter of `pwsh.exe`/`PowerShell.exe` to start PowerShell without a profile to avoid executing the scripts in the user profile
parent da2508c9
......@@ -118,7 +118,7 @@ GOTO :after_subroutine
REM into 1. The exit code 2 is used to detect the case where the major version is incorrect and there should be
REM no subsequent retries.
ECHO Downloading Dart SDK from Flutter engine %dart_required_version%... 1>&2
%powershell_executable% -ExecutionPolicy Bypass -Command "Unblock-File -Path '%update_dart_bin%'; & '%update_dart_bin%'; exit $LASTEXITCODE;"
%powershell_executable% -ExecutionPolicy Bypass -NoProfile -Command "Unblock-File -Path '%update_dart_bin%'; & '%update_dart_bin%'; exit $LASTEXITCODE;"
IF "%ERRORLEVEL%" EQU "2" (
EXIT 1
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment