Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
135c511e
Unverified
Commit
135c511e
authored
May 11, 2020
by
Igor Akkerman
Committed by
GitHub
May 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PowerShell executable detection added, fixing usage of PowerShell version >=6 (#56714)
parent
4ecb1bbe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
flutter.bat
bin/flutter.bat
+14
-1
No files found.
bin/flutter.bat
View file @
135c511e
...
...
@@ -43,6 +43,19 @@ IF NOT EXIST "%flutter_root%\.git" (
EXIT /B 1
)
REM Detect which PowerShell executable is available on the Host
REM PowerShell version <= 5: PowerShell.exe
REM PowerShell version >= 6: pwsh.exe
WHERE /Q pwsh.exe && (
SET powershell_executable=pwsh.exe
) || WHERE /Q PowerShell.exe && (
SET powershell_executable=PowerShell.exe
) || (
ECHO Error: PowerShell executable not found.
ECHO Either pwsh.exe or PowerShell.exe must be in your PATH.
EXIT /B 1
)
REM Ensure that bin/cache exists.
IF NOT EXIST "%cache_dir%" MKDIR "%cache_dir%"
...
...
@@ -101,7 +114,7 @@ GOTO :after_subroutine
SET update_dart_bin=%FLUTTER_ROOT%/bin/internal/update_dart_sdk.ps1
REM Escape apostrophes from the executable path
SET "update_dart_bin=!update_dart_bin:'=''!"
PowerShell.exe
-ExecutionPolicy Bypass -Command "Unblock-File -Path '%update_dart_bin%'; & '%update_dart_bin%'"
%powershell_executable%
-ExecutionPolicy Bypass -Command "Unblock-File -Path '%update_dart_bin%'; & '%update_dart_bin%'"
IF "%ERRORLEVEL%" NEQ "0" (
ECHO Error: Unable to update Dart SDK. Retrying...
timeout /t 5 /nobreak
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment