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 1f4a191fab0963d606d99e4cc10d7434bd41be58..e5541452e106eebdaac205a2956784cc8a2d9e23 100644 |
--- a/sdk/lib/_internal/pub/lib/src/command/upgrade.dart |
+++ b/sdk/lib/_internal/pub/lib/src/command/upgrade.dart |
@@ -24,32 +24,14 @@ class UpgradeCommand extends PubCommand { |
help: 'Use cached packages instead of accessing the network.'); |
commandParser.addFlag('dry-run', abbr: 'n', negatable: false, |
- help: 'Report what dependencies would change but do not change any.'); |
+ help: "Report what dependencies would change but don't change any."); |
} |
Future onRun() { |
var upgradeAll = commandOptions.rest.isEmpty; |
nweiz
2014/06/19 19:39:20
This variable is now unused.
Bob Nystrom
2014/06/19 23:28:24
Done.
|
var dryRun = commandOptions['dry-run']; |
return entrypoint.acquireDependencies(useLatest: commandOptions.rest, |
- upgradeAll: upgradeAll, dryRun: dryRun).then((numChanged) { |
- if (dryRun) { |
- if (numChanged == 0) { |
- log.message("No dependencies would change."); |
- } else if (numChanged == 1) { |
- log.message("Would change $numChanged dependency."); |
- } else { |
- log.message("Would change $numChanged dependencies."); |
- } |
- } else { |
- if (numChanged == 0) { |
- log.message("No dependencies changed."); |
- } else if (numChanged == 1) { |
- log.message("Changed $numChanged dependency!"); |
- } else { |
- log.message("Changed $numChanged dependencies!"); |
- } |
- } |
- |
+ isUpgrade: true, dryRun: dryRun).then((_) { |
if (isOffline) { |
log.warning("Warning: Upgrading when offline may not update you to the " |
"latest versions of your dependencies."); |