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

Unified Diff: sdk/lib/_internal/pub/lib/src/command/downgrade.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
Index: sdk/lib/_internal/pub/lib/src/command/downgrade.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/downgrade.dart b/sdk/lib/_internal/pub/lib/src/command/downgrade.dart
index 94e8fc6c056d3442c6937f47857e9d648ae559a8..d3313a49b104dfedef48800d70473cad762811f7 100644
--- a/sdk/lib/_internal/pub/lib/src/command/downgrade.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/downgrade.dart
@@ -28,14 +28,13 @@ class DowngradeCommand 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.DOWNGRADE,
- useLatest: commandOptions.rest, dryRun: dryRun).then((_) {
- if (isOffline) {
- log.warning("Warning: Downgrading when offline may not update you to "
- "the oldest versions of your dependencies.");
- }
- });
+ await entrypoint.acquireDependencies(SolveType.DOWNGRADE,
+ useLatest: commandOptions.rest, dryRun: dryRun);
+ if (isOffline) {
+ log.warning("Warning: Downgrading when offline may not update you to "
+ "the oldest versions of your dependencies.");
+ }
}
}
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/cache_repair.dart ('k') | sdk/lib/_internal/pub/lib/src/command/serve.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698