Chromium Code Reviews| 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!")); |
| } |
| } |