Index: utils/pub/validator/lib.dart |
diff --git a/utils/pub/validator/lib.dart b/utils/pub/validator/lib.dart |
index faee7290231abda4caa52fa2be39bc1ab66c36b0..7346223ebaf27a68231d6330af382a763bfcf87f 100644 |
--- a/utils/pub/validator/lib.dart |
+++ b/utils/pub/validator/lib.dart |
@@ -23,8 +23,8 @@ class LibValidator extends Validator { |
Future validate() { |
var libDir = join(entrypoint.root.dir, "lib"); |
- return dirExists(libDir).then((libDirExists) { |
- if (!libDirExists) { |
+ return defer(() { |
+ if (!dirExists(libDir)) { |
errors.add('You must have a "lib" directory.\n' |
"Without that, users cannot import any code from your package."); |
return; |