Index: sdk/lib/_internal/pub/lib/src/command/upgrade.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/command/upgrade.dart b/sdk/lib/_internal/pub/lib/src/command/upgrade.dart |
index c42c33b385b4df610dad2dd9fd01999158681274..841a3ef6d79894c16bac2e49f1f07a61b83adeca 100644 |
--- a/sdk/lib/_internal/pub/lib/src/command/upgrade.dart |
+++ b/sdk/lib/_internal/pub/lib/src/command/upgrade.dart |
@@ -29,14 +29,13 @@ class UpgradeCommand extends PubCommand { |
help: "Report what dependencies would change but don't change any."); |
} |
- Future onRun() { |
+ Future onRun() async { |
var dryRun = commandOptions['dry-run']; |
- return entrypoint.acquireDependencies(SolveType.UPGRADE, |
- useLatest: commandOptions.rest, dryRun: dryRun).then((_) { |
- if (isOffline) { |
- log.warning("Warning: Upgrading when offline may not update you to the " |
- "latest versions of your dependencies."); |
- } |
- }); |
+ await entrypoint.acquireDependencies(SolveType.UPGRADE, |
+ useLatest: commandOptions.rest, dryRun: dryRun); |
+ if (isOffline) { |
+ log.warning("Warning: Upgrading when offline may not update you to the " |
+ "latest versions of your dependencies."); |
+ } |
} |
} |