Skip to content

Commit 1f85497

Browse files
authored
[flutter_tools] Add the NoProfile parameter to the PowerShell execution statement (flutter#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
1 parent da2508c commit 1f85497

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/internal/shared.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ GOTO :after_subroutine
118118
REM into 1. The exit code 2 is used to detect the case where the major version is incorrect and there should be
119119
REM no subsequent retries.
120120
ECHO Downloading Dart SDK from Flutter engine %dart_required_version%... 1>&2
121-
%powershell_executable% -ExecutionPolicy Bypass -Command "Unblock-File -Path '%update_dart_bin%'; & '%update_dart_bin%'; exit $LASTEXITCODE;"
121+
%powershell_executable% -ExecutionPolicy Bypass -NoProfile -Command "Unblock-File -Path '%update_dart_bin%'; & '%update_dart_bin%'; exit $LASTEXITCODE;"
122122
IF "%ERRORLEVEL%" EQU "2" (
123123
EXIT 1
124124
)

0 commit comments

Comments
 (0)