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