Fix download Dart DK step to work for paths with apostrophes (#15137)

Fixes https://github.com/flutter/flutter/issues/15136
This commit is contained in:
Todd Volkert 2018-03-04 12:15:22 -08:00 committed by GitHub
parent fe334e1652
commit c885015934
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,7 +88,10 @@ GOTO :after_subroutine
:do_sdk_update_and_snapshot
ECHO Checking Dart SDK version...
CALL PowerShell.exe -ExecutionPolicy Bypass -Command "& '%FLUTTER_ROOT%/bin/internal/update_dart_sdk.ps1'"
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:'=''!"
CALL PowerShell.exe -ExecutionPolicy Bypass -Command "& '%update_dart_bin%'"
IF "%ERRORLEVEL%" NEQ "0" (
ECHO Error: Unable to update Dart SDK. Retrying...
timeout /t 5 /nobreak