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

Unified Diff: lib/src/command/cache_repair.dart

Issue 2079303003: Track Source objects in PackageNames. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 6 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 | « lib/src/command/cache_add.dart ('k') | lib/src/entrypoint.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/command/cache_repair.dart
diff --git a/lib/src/command/cache_repair.dart b/lib/src/command/cache_repair.dart
index cf7e6512b568fb6311f82fac3dea91c870d2ba7f..6c238fa149dfa4fd5ce7b6d92e6c7b8339d79d0d 100644
--- a/lib/src/command/cache_repair.dart
+++ b/lib/src/command/cache_repair.dart
@@ -24,8 +24,7 @@ class CacheRepairCommand extends PubCommand {
var failures = [];
// Repair every cached source.
- for (var source in cache.sources.all
- .map((source) => cache.source(source.name))) {
+ for (var source in cache.sources.all.map(cache.source)) {
if (source is! CachedSource) continue;
var results = await source.repairCachedPackages();
@@ -45,7 +44,7 @@ class CacheRepairCommand extends PubCommand {
for (var id in failures) {
buffer.write("- ${log.bold(id.name)} ${id.version}");
- if (cache.sources[id.source] != cache.sources.defaultSource) {
+ if (id.source != cache.sources.defaultSource) {
buffer.write(" from ${id.source}");
}
buffer.writeln();
« no previous file with comments | « lib/src/command/cache_add.dart ('k') | lib/src/entrypoint.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698