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

Unified Diff: sdk/lib/_internal/pub/lib/src/command_install.dart

Issue 15444003: Use args' command support for pub commands. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Initialize command args in constructor. Created 7 years, 7 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
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command.dart ('k') | sdk/lib/_internal/pub/lib/src/command_lish.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/command_install.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command_install.dart b/sdk/lib/_internal/pub/lib/src/command_install.dart
index a57886f8d8e778e5a246b6150200e45a104ee3c5..afc9d2f88aefb84f902418cc95686853bab9d574 100644
--- a/sdk/lib/_internal/pub/lib/src/command_install.dart
+++ b/sdk/lib/_internal/pub/lib/src/command_install.dart
@@ -17,14 +17,13 @@ class InstallCommand extends PubCommand {
String get description => "Install the current package's dependencies.";
String get usage => "pub install";
- ArgParser get commandParser {
- return new ArgParser()
- ..addFlag('offline',
- help: 'Use cached packages instead of accessing the network.');
- }
-
bool get isOffline => commandOptions['offline'];
+ InstallCommand() {
+ commandParser.addFlag('offline',
+ help: 'Use cached packages instead of accessing the network.');
+ }
+
Future onRun() {
return entrypoint.installDependencies()
.then((_) => log.message("Dependencies installed!"));
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command.dart ('k') | sdk/lib/_internal/pub/lib/src/command_lish.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698