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

Unified Diff: utils/pub/command_update.dart

Issue 10809058: Make "pub update PACKAGE" update a specific package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | « no previous file | utils/pub/entrypoint.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/command_update.dart
diff --git a/utils/pub/command_update.dart b/utils/pub/command_update.dart
index 959ee1812b155cf1f809f832465a47ea912534a5..c4a1045b360802681e9de429dc075452b046e887 100644
--- a/utils/pub/command_update.dart
+++ b/utils/pub/command_update.dart
@@ -12,11 +12,15 @@ class UpdateCommand extends PubCommand {
String get description() =>
"update the current package's dependencies to the latest versions";
- String get usage() => 'pub update';
+ String get usage() => 'pub update [dependencies...]';
Future onRun() {
- return entrypoint.updateDependencies().transform((_) {
- print("Dependencies updated!");
- });
+ var future;
+ if (commandOptions.rest.isEmpty) {
Bob Nystrom 2012/07/23 20:44:07 isEmpty() <sigh>
+ future = entrypoint.updateAllDependencies();
+ } else {
+ future = entrypoint.updateDependencies(commandOptions.rest);
+ }
+ return future.transform((_) => print("Dependencies updated!"));
}
}
« no previous file with comments | « no previous file | utils/pub/entrypoint.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698