Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(656)

Unified Diff: sdk/lib/_internal/pub/lib/src/command/upgrade.dart

Issue 521643005: Convert more pub code to use async/await. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise! Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/serve.dart ('k') | sdk/lib/_internal/pub/lib/src/executable.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.");
+ }
}
}
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/serve.dart ('k') | sdk/lib/_internal/pub/lib/src/executable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698