From d2dcec22ce8838ad376bef7c2bac6a7d2acfe565 Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Thu, 1 Mar 2018 12:24:25 -0800 Subject: [PATCH] =?UTF-8?q?Provide=20a=20more=20helpful=20error=20message?= =?UTF-8?q?=20when=20we=20detect=20the=20user=20is=20tryin=E2=80=A6=20(#15?= =?UTF-8?q?032)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes https://github.com/flutter/flutter/issues/14950 --- bin/flutter | 3 +++ bin/flutter.bat | 3 +++ 2 files changed, 6 insertions(+) diff --git a/bin/flutter b/bin/flutter index 61f25bdd80..0dc02d8b94 100755 --- a/bin/flutter +++ b/bin/flutter @@ -128,6 +128,9 @@ fi # Test if the flutter directory is a git clone (otherwise git rev-parse HEAD would fail) if [ ! -e "$FLUTTER_ROOT/.git" ]; then echo "Error: The Flutter directory is not a clone of the GitHub project." + echo " The flutter tool requires Git in order to operate properly;" + echo " to set up Flutter, run the following command:" + echo " git clone -b beta https://github.com/flutter/flutter.git" exit 1 fi diff --git a/bin/flutter.bat b/bin/flutter.bat index 06437b66dc..66cffcf0cb 100644 --- a/bin/flutter.bat +++ b/bin/flutter.bat @@ -38,6 +38,9 @@ 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. + ECHO The flutter tool requires Git in order to operate properly; + ECHO to set up Flutter, run the following command: + ECHO git clone -b beta https://github.com/flutter/flutter.git EXIT /B 1 )