Skip to content

Commit

Permalink
handle missing curl (flutter#27295)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahwilliams authored Jan 30, 2019
1 parent 8ea8b18 commit 3d2f984
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions bin/internal/update_dart_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3d2f984

Please sign in to comment.