Index: utils/pub/validator/license.dart |
diff --git a/utils/pub/validator/license.dart b/utils/pub/validator/license.dart |
index 8c32548c9c6918812bb94d1fd113e3e94520017d..63b9aa86a801ab5274aaa3b2dc8ae90288d708e5 100644 |
--- a/utils/pub/validator/license.dart |
+++ b/utils/pub/validator/license.dart |
@@ -6,6 +6,8 @@ library pubspec_field_validator; |
import 'dart:async'; |
+import '../../../pkg/path/lib/path.dart' as path; |
+ |
import '../entrypoint.dart'; |
import '../io.dart'; |
import '../system_cache.dart'; |
@@ -20,7 +22,7 @@ class LicenseValidator extends Validator { |
return listDir(entrypoint.root.dir).then((files) { |
var licenseLike = new RegExp( |
r"^([a-zA-Z0-9]+[-_])?(LICENSE|COPYING)(\..*)?$"); |
- if (files.map(basename).any(licenseLike.hasMatch)) return; |
+ if (files.map(path.basename).any(licenseLike.hasMatch)) return; |
errors.add( |
"You must have a COPYING or LICENSE file in the root directory.\n" |