From a49c854f671e34396cae13b7ad6d187e49b2979d Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Wed, 8 Feb 2017 21:51:11 -0800 Subject: [PATCH] Exit Code Fixes for Windows (#8006) * return 1 when checks in `flutter.bat` fail * don't assume file extension of git (depending on the system it can be `git.exe` or `git.bat`) --- bin/flutter.bat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/flutter.bat b/bin/flutter.bat index 243fd86c15..4a14a37961 100644 --- a/bin/flutter.bat +++ b/bin/flutter.bat @@ -27,11 +27,11 @@ SET dart=%dart_sdk_path%\bin\dart.exe SET pub=%dart_sdk_path%\bin\pub.bat REM Test if Git is available on the Host -where /q git.exe || ECHO Error: Unable to find git.exe in your PATH. && EXIT /B +where /q git || ECHO Error: Unable to find git in your PATH. && EXIT /B 1 REM Test if the flutter directory is a git clone, otherwise git rev-parse HEAD would fail IF NOT EXIST "%flutter_root%\.git" ( ECHO Error: The Flutter directory is not a clone of the GitHub project. - EXIT /B + EXIT /B 1 ) REM Ensure that bin/cache exists. @@ -95,4 +95,4 @@ IF /I "%exit_code%" EQU "253" ( SET exit_code=%ERRORLEVEL% ) -EXIT %exit_code% +EXIT /B %exit_code%