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

Unified Diff: utils/pub/command_cache.dart

Issue 13332009: Make listDir and createSymlink synchronous in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 7 years, 9 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
« no previous file with comments | « no previous file | utils/pub/command_lish.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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}));
}
}
« no previous file with comments | « no previous file | utils/pub/command_lish.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698