From e742b901b8d536e57660f16ab2dd9ffabd4e9de6 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Tue, 7 Feb 2017 17:15:34 -0800 Subject: [PATCH] Tiny simplification of launch scripts (#7949) Call `pub upgrade` instead of manually deleting `pubspec.lock` and then calling `pub get`. `pub upgrade` ignores the `pubspec.lock`, but is otherwise identically to 'pub get' (https://www.dartlang.org/tools/pub/cmd/pub-upgrade). --- bin/flutter | 2 +- bin/flutter.bat | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/flutter b/bin/flutter index a1745bc97a0..804bac05365 100755 --- a/bin/flutter +++ b/bin/flutter @@ -72,7 +72,7 @@ fi "$FLUTTER_ROOT/bin/internal/update_dart_sdk.sh" echo Building flutter tool... - (cd "$FLUTTER_TOOLS_DIR"; rm -f pubspec.lock; "$PUB" get --verbosity=error --no-packages-dir) + (cd "$FLUTTER_TOOLS_DIR"; "$PUB" upgrade --verbosity=error --no-packages-dir) "$DART" --snapshot="$SNAPSHOT_PATH" --packages="$FLUTTER_TOOLS_DIR/.packages" "$SCRIPT_PATH" echo $REVISION > "$STAMP_PATH" fi diff --git a/bin/flutter.bat b/bin/flutter.bat index 1bdb90a2bef..3d621950d64 100644 --- a/bin/flutter.bat +++ b/bin/flutter.bat @@ -74,9 +74,8 @@ GOTO :after_subroutine CALL PowerShell.exe -ExecutionPolicy Bypass -Command "& '%FLUTTER_ROOT%/bin/internal/update_dart_sdk.ps1'" ECHO Updating flutter tool... - del "%flutter_tools_dir%\pubspec.lock" PUSHD "%flutter_tools_dir%" - CALL "%pub%" get --verbosity=error --no-packages-dir + CALL "%pub%" upgrade --verbosity=error --no-packages-dir POPD CALL "%dart%" --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.packages" "%script_path%" >"%stamp_path%" ECHO %revision%