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

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

Issue 489823002: Add "pub global list" command to show all globally activated packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address code review comments Created 6 years, 4 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/global_list.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/global_list.dart b/sdk/lib/_internal/pub/lib/src/command/global_list.dart
new file mode 100644
index 0000000000000000000000000000000000000000..c498b42545ba87e2c1ae911866cda2036145b927
--- /dev/null
+++ b/sdk/lib/_internal/pub/lib/src/command/global_list.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// 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.
+
+library pub.command.global_list;
+
+import 'dart:async';
+
+import '../command.dart';
+
+/// Handles the `global list` pub command.
+class GlobalListCommand extends PubCommand {
+ bool get allowTrailingOptions => false;
+ String get description => 'List globally activated packages.';
+ String get usage => 'pub global list';
+
+ Future onRun() {
+ globals.listActivePackages();
+ return null;
+ }
+}
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/global.dart ('k') | sdk/lib/_internal/pub/lib/src/global_packages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698