Unverified Commit d2dcec22 authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Provide a more helpful error message when we detect the user is tryin… (#15032)

Fixes https://github.com/flutter/flutter/issues/14950
parent 621a963e
......@@ -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
......
......@@ -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
)
......
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