| Index: utils/pub/command_cache.dart
|
| diff --git a/utils/pub/command_cache.dart b/utils/pub/command_cache.dart
|
| index 056f3834e52d3c99b620c85ddd6473ea9fffd3f2..c3a3a3d53c16945436a64da7642d16af9ef6386c 100644
|
| --- a/utils/pub/command_cache.dart
|
| +++ b/utils/pub/command_cache.dart
|
| @@ -33,18 +33,17 @@ class CacheCommand extends PubCommand {
|
| }
|
|
|
| // TODO(keertip): Add flag to list packages from non default sources
|
| - return cache.sources.defaultSource.getCachedPackages().then((packages){
|
| - var packagesObj = <String, Map>{};
|
| - for (var package in packages){
|
| - packagesObj[package.name] = {
|
| - 'version': package.version.toString(),
|
| - 'location': package.dir
|
| - };
|
| - }
|
| - // TODO(keertip): Add support for non-JSON format
|
| - // and check for --format flag
|
| - log.message( json.stringify({'packages': packagesObj}));
|
| - });
|
| + var packagesObj = <String, Map>{};
|
| + for (var package in cache.sources.defaultSource.getCachedPackages()) {
|
| + packagesObj[package.name] = {
|
| + 'version': package.version.toString(),
|
| + 'location': package.dir
|
| + };
|
| + }
|
| +
|
| + // TODO(keertip): Add support for non-JSON format
|
| + // and check for --format flag
|
| + log.message(json.stringify({'packages': packagesObj}));
|
| }
|
| }
|
|
|
|
|