| Index: utils/pub/validator/license.dart
|
| diff --git a/utils/pub/validator/license.dart b/utils/pub/validator/license.dart
|
| index 6cd623b643fd569ac89ee62e5a6f39fcc7da87eb..ffcbd10c9deb8b2e669348bfa659aa31ac2547f9 100644
|
| --- a/utils/pub/validator/license.dart
|
| +++ b/utils/pub/validator/license.dart
|
| @@ -19,10 +19,14 @@ class LicenseValidator extends Validator {
|
| : super(entrypoint);
|
|
|
| Future validate() {
|
| - return listDir(entrypoint.root.dir).then((files) {
|
| + return new Future.of(() {
|
| var licenseLike = new RegExp(
|
| r"^([a-zA-Z0-9]+[-_])?(LICENSE|COPYING)(\..*)?$");
|
| - if (files.map(path.basename).any(licenseLike.hasMatch)) return;
|
| + if (listDir(entrypoint.root.dir)
|
| + .map(path.basename)
|
| + .any(licenseLike.hasMatch)) {
|
| + return;
|
| + }
|
|
|
| errors.add(
|
| "You must have a COPYING or LICENSE file in the root directory.\n"
|
|
|