handle missing curl (#27295)

This commit is contained in:
Jonah Williams 2019-01-30 12:53:23 -08:00 committed by GitHub
parent 8ea8b18fb9
commit 3d2f98498f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,23 @@ ENGINE_STAMP="$FLUTTER_ROOT/bin/cache/engine-dart-sdk.stamp"
ENGINE_VERSION=`cat "$FLUTTER_ROOT/bin/internal/engine.version"`
if [ ! -f "$ENGINE_STAMP" ] || [ "$ENGINE_VERSION" != `cat "$ENGINE_STAMP"` ]; then
command -v curl > /dev/null 2>&1 || {
echo
echo 'Missing "curl" tool. Unable to download Dart SDK.'
case "$(uname -s)" in
Darwin)
echo 'Consider running "brew install curl".'
;;
Linux)
echo 'Consider running "sudo apt-get install curl".'
;;
*)
echo "Please install curl."
;;
esac
echo
exit 1
}
echo "Downloading Dart SDK from Flutter engine $ENGINE_VERSION..."
case "$(uname -s)" in