| Index: utils/pub/command_list.dart
|
| diff --git a/utils/pub/command_list.dart b/utils/pub/command_list.dart
|
| index e90454489983e5357b5c93654763b10a6d28402a..9de8817e91ac8d4a0c9755997bd961dc98230dc7 100644
|
| --- a/utils/pub/command_list.dart
|
| +++ b/utils/pub/command_list.dart
|
| @@ -2,14 +2,20 @@
|
| // 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 `list` pub command. */
|
| -void commandList(PubOptions options, List<String> args) {
|
| - // TODO(rnystrom): Validate args. Right now, this just lists the packages in
|
| - // your cache.
|
| - cache.listAll().then((packages) {
|
| - packages.sort((a, b) => a.name.compareTo(b.name));
|
| - for (final package in packages) {
|
| - print(package.name);
|
| - }
|
| - });
|
| -}
|
| +/**
|
| + * Handles the `list` pub command. This is mostly just used so we can pull
|
| + * some basic data out of pub in the integration tests. Once pub is more
|
| + * full-featured and has other commands that test everything it does, this
|
| + * may go away.
|
| + */
|
| +class ListCommand extends PubCommand {
|
| + String get description() => 'print the contents of repositories';
|
| +
|
| + void onRun() {
|
| + cache.listAll().then((packages) {
|
| + for (final package in packages) {
|
| + print(package.name);
|
| + }
|
| + });
|
| + }
|
| +}
|
|
|