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

Unified Diff: utils/pub/command_version.dart

Issue 10214006: Refactor command code and add support for --help and --version. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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: utils/pub/command_version.dart
diff --git a/utils/pub/command_update.dart b/utils/pub/command_version.dart
similarity index 55%
copy from utils/pub/command_update.dart
copy to utils/pub/command_version.dart
index c1fe4f4816b65723c926c8684b30c3770c32da77..a65a5ba84ac257bbc48f1106a4b08577bb97217a 100644
--- a/utils/pub/command_update.dart
+++ b/utils/pub/command_version.dart
@@ -2,7 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-/** Handles the `update` pub command. */
-void commandUpdate(PubOptions options, List<String> args) {
- throw 'not implemented yet';
-}
+/** Handles the `version` pub command. */
+class VersionCommand extends PubCommand {
+ String get description() => 'print Pub version';
+
+ void onRun() => printVersion();
+}

Powered by Google App Engine
This is Rietveld 408576698