Index: utils/pub/validator/lib.dart |
diff --git a/utils/pub/validator/lib.dart b/utils/pub/validator/lib.dart |
index b0dfbe5e51c0b70e1d287c7835586202815961fb..6afeb88fb0e5a0b5556ab4448bd6942cb0a18c47 100644 |
--- a/utils/pub/validator/lib.dart |
+++ b/utils/pub/validator/lib.dart |
@@ -29,8 +29,8 @@ class LibValidator extends Validator { |
return new Future.immediate(null); |
} |
- return listDir(libDir).transform((files) { |
- files = files.map((file) => relativeTo(file, libDir)); |
+ return listDir(libDir).then((files) { |
+ files = files.mappedBy((file) => relativeTo(file, libDir)).toList(); |
if (files.isEmpty) { |
errors.add('You must have a non-empty "lib" directory.\n' |
"Without that, users cannot import any code from your package."); |