Chromium Code Reviews| 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 306e027cfdf9b30fac4d4177048871aa2b07817a..08fa1e88a1f4f5723c4c41a144ceec9601bbf688 100644 |
| --- a/sdk/lib/_internal/pub/lib/src/command/upgrade.dart |
| +++ b/sdk/lib/_internal/pub/lib/src/command/upgrade.dart |
| @@ -26,15 +26,17 @@ class UpgradeCommand extends PubCommand { |
| } |
| Future onRun() { |
| - var future; |
| - if (commandOptions.rest.isEmpty) { |
| - future = entrypoint.upgradeAllDependencies(); |
| - } else { |
| - future = entrypoint.upgradeDependencies(commandOptions.rest); |
| - } |
| - |
| - return future.then((_) { |
| - log.message("Dependencies upgraded!"); |
| + var upgradeAll = commandOptions.rest.isEmpty; |
| + return entrypoint.getDependencies(useLatest: commandOptions.rest, |
| + upgradeAll: upgradeAll).then((numChanged) { |
| + if (numChanged == 0) { |
| + log.message("No dependencies changed."); |
| + } else if (numChanged == 1) { |
| + log.message("Changed $numChanged dependency!"); |
| + } else { |
| + log.message("Changed $numChanged dependencies!"); |
|
nweiz
2013/12/11 06:48:32
I don't know how clear the notion of "changing a d
Bob Nystrom
2013/12/11 22:36:59
Yup, also the common cases of adding a new depende
|
| + } |
| + |
| if (isOffline) { |
| log.warning("Warning: Upgrading when offline may not update you to the " |
| "latest versions of your dependencies."); |