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

Unified Diff: sdk/lib/_internal/pub/lib/src/command/get.dart

Issue 805393002: Update pub to use the new command runner API in args. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 5 years, 11 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
Index: sdk/lib/_internal/pub/lib/src/command/get.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/get.dart b/sdk/lib/_internal/pub/lib/src/command/get.dart
index 7394e0c76ae1312e8c9037d4f175af677c3e4be3..d2fc51311eceb0ef09faf2ec7a73c02815b5f6f3 100644
--- a/sdk/lib/_internal/pub/lib/src/command/get.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/get.dart
@@ -11,22 +11,23 @@ import '../solver/version_solver.dart';
/// Handles the `get` pub command.
class GetCommand extends PubCommand {
+ String get name => "get";
String get description => "Get the current package's dependencies.";
- String get usage => "pub get";
+ String get invocation => "pub get";
String get docUrl => "http://dartlang.org/tools/pub/cmd/pub-get.html";
List<String> get aliases => const ["install"];
- bool get isOffline => commandOptions["offline"];
+ bool get isOffline => argResults["offline"];
GetCommand() {
- commandParser.addFlag('offline',
+ argParser.addFlag('offline',
help: 'Use cached packages instead of accessing the network.');
- commandParser.addFlag('dry-run', abbr: 'n', negatable: false,
+ argParser.addFlag('dry-run', abbr: 'n', negatable: false,
help: "Report what dependencies would change but don't change any.");
}
- Future onRun() {
+ Future run() {
return entrypoint.acquireDependencies(SolveType.GET,
- dryRun: commandOptions['dry-run']);
+ dryRun: argResults['dry-run']);
}
}
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/downgrade.dart ('k') | sdk/lib/_internal/pub/lib/src/command/global.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698