Commit 6d41c704 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Preserve exit code on Windows (#7987)

parent f17e3f45
......@@ -86,9 +86,13 @@ GOTO :after_subroutine
:after_subroutine
CALL "%dart%" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %*
SET exit_code=%ERRORLEVEL%
REM The VM exits with code 253 if the snapshot version is out-of-date.
IF /I "%ERRORLEVEL%" EQU "253" (
CALL "%dart%" --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.packages" "%script_path%"
CALL "%dart%" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %*
IF /I "%exit_code%" EQU "253" (
CALL "%dart%" --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.packages" "%script_path%"
CALL "%dart%" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %*
SET exit_code=%ERRORLEVEL%
)
EXIT %exit_code%
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