Index: utils/pub/package.dart |
diff --git a/utils/pub/package.dart b/utils/pub/package.dart |
index 1bc7445869c2c1e4dcc8aa8f5a9db9cb56f8da19..d3d9819088ce9d30a76baab19871991b658034f0 100644 |
--- a/utils/pub/package.dart |
+++ b/utils/pub/package.dart |
@@ -43,20 +43,18 @@ class Package { |
/// same conventions as pub.dartlang.org for choosing the primary one: the |
/// README with the fewest extensions that is lexically ordered first is |
/// chosen. |
- Future<String> get readmePath { |
- return listDir(dir).then((entries) { |
- var readmes = entries.map(path.basename). |
- where((entry) => entry.contains(_README_REGEXP)); |
- if (readmes.isEmpty) return; |
- |
- return path.join(dir, readmes.min((readme1, readme2) { |
- var extensions1 = ".".allMatches(readme1).length; |
- var extensions2 = ".".allMatches(readme2).length; |
- var comparison = extensions1.compareTo(extensions2); |
- if (comparison != 0) return comparison; |
- return readme1.compareTo(readme2); |
- })); |
- }); |
+ String get readmePath { |
+ var readmes = listDir(dir).map(path.basename). |
+ where((entry) => entry.contains(_README_REGEXP)); |
+ if (readmes.isEmpty) return; |
+ |
+ return path.join(dir, readmes.min((readme1, readme2) { |
+ var extensions1 = ".".allMatches(readme1).length; |
+ var extensions2 = ".".allMatches(readme2).length; |
+ var comparison = extensions1.compareTo(extensions2); |
+ if (comparison != 0) return comparison; |
+ return readme1.compareTo(readme2); |
+ })); |
} |
/// Loads the package whose root directory is [packageDir]. [name] is the |