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

Unified Diff: sdk/lib/_internal/pub/lib/src/command_update.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
Index: sdk/lib/_internal/pub/lib/src/command_update.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command_update.dart b/sdk/lib/_internal/pub/lib/src/command_update.dart
index 707ac6f6ff9b3dc2bc3ce7a00793e491e6ddb139..3db7ba848953140873953c5ed8a5a1bbbe5e40be 100644
--- a/sdk/lib/_internal/pub/lib/src/command_update.dart
+++ b/sdk/lib/_internal/pub/lib/src/command_update.dart
@@ -19,14 +19,13 @@ class UpdateCommand extends PubCommand {
String get usage => 'pub update [dependencies...]';
- ArgParser get commandParser {
- return new ArgParser()
- ..addFlag('offline',
- help: 'Use cached packages instead of accessing the network.');
- }
-
bool get isOffline => commandOptions['offline'];
+ UpdateCommand() {
+ commandParser.addFlag('offline',
+ help: 'Use cached packages instead of accessing the network.');
+ }
+
Future onRun() {
var future;
if (commandOptions.rest.isEmpty) {
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command_lish.dart ('k') | sdk/lib/_internal/pub/lib/src/command_uploader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698