Index: tools/gardening/lib/src/cache.dart |
diff --git a/tools/gardening/lib/src/cache.dart b/tools/gardening/lib/src/cache.dart |
index 4dfac0128c5d714420b40bd549e2b68867862470..e9878bc0456624e1de82d9a66f3b93a2744f087a 100644 |
--- a/tools/gardening/lib/src/cache.dart |
+++ b/tools/gardening/lib/src/cache.dart |
@@ -23,6 +23,9 @@ class Cache { |
log('Found $path in memory cache'); |
return memoryCache[path]; |
} |
+ if (base == null) { |
+ return ifAbsent(); |
+ } |
File file = new File.fromUri(base.resolve(path)); |
String text; |
if (file.existsSync()) { |
@@ -39,6 +42,7 @@ class Cache { |
/// Store [text] as the cache data for [path]. |
void write(String path, String text) { |
+ if (base == null) return; |
log('Creating $path in file cache'); |
File file = new File.fromUri(base.resolve(path)); |
file.createSync(recursive: true); |