Chromium Code Reviews

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

Issue 243683002: Refactor Source. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise all the things. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: sdk/lib/_internal/pub/lib/src/command/cache_repair.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/cache_repair.dart b/sdk/lib/_internal/pub/lib/src/command/cache_repair.dart
index 450951b238b2330d47351266e0f9a0f991d9dcd0..5a1a557941da898c31552204d5f1da68a56f24c9 100644
--- a/sdk/lib/_internal/pub/lib/src/command/cache_repair.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/cache_repair.dart
@@ -10,6 +10,7 @@ import '../command.dart';
import '../exit_codes.dart' as exit_codes;
import '../io.dart';
import '../log.dart' as log;
+import '../source/cached.dart';
import '../utils.dart';
/// Handles the `cache repair` pub command.
@@ -24,7 +25,7 @@ class CacheRepairCommand extends PubCommand {
// Repair every cached source.
return Future.forEach(cache.sources.where(
- (source) => source.shouldCache), (source) {
+ (source) => source is CachedSource), (source) {
return source.repairCachedPackages().then((results) {
successes += results.first;
failures += results.last;
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/cache_list.dart ('k') | sdk/lib/_internal/pub/lib/src/entrypoint.dart » ('j') | no next file with comments »

Powered by Google App Engine