| 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..a14ab6fe5de669b6ef845ce11ee31ca7fe7e1b34 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/command/upgrade.dart
|
| +++ b/sdk/lib/_internal/pub/lib/src/command/upgrade.dart
|
| @@ -26,15 +26,19 @@ 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.acquireDependencies(useLatest: commandOptions.rest,
|
| + upgradeAll: upgradeAll).then((numChanged) {
|
| + // TODO(rnystrom): Show a more detailed message about what was added,
|
| + // removed, modified, and/or upgraded?
|
| + if (numChanged == 0) {
|
| + log.message("No dependencies changed.");
|
| + } else if (numChanged == 1) {
|
| + log.message("Changed $numChanged dependency!");
|
| + } else {
|
| + log.message("Changed $numChanged dependencies!");
|
| + }
|
| +
|
| if (isOffline) {
|
| log.warning("Warning: Upgrading when offline may not update you to the "
|
| "latest versions of your dependencies.");
|
|
|