Index: lib/src/package.dart |
diff --git a/lib/src/package.dart b/lib/src/package.dart |
index fa111a4bc8a4e150bd7815db2a245a58959aac11..f713e9f4a1fe5992efb8dbb528898ba055d8e280 100644 |
--- a/lib/src/package.dart |
+++ b/lib/src/package.dart |
@@ -190,6 +190,9 @@ class Package { |
/// convert them to paths relative to the package root, use [relative]. |
List<String> listFiles({String beneath, bool recursive: true, |
bool useGitIgnore: false}) { |
+ // An in-memory package has no files. |
+ if (dir == null) return []; |
+ |
if (beneath == null) { |
beneath = dir; |
} else { |