Unverified Commit 9a9339fb authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Fix bug in docs.dart (#72544)

Add a check that a pubspec file exists before trying to read it.
parent 1c530a92
......@@ -468,6 +468,10 @@ List<Directory> findPackages() {
if (entity is! Directory)
return false;
final File pubspec = File('${entity.path}/pubspec.yaml');
if (!pubspec.existsSync()) {
print("Unexpected package '${entity.path}' found in packages directory");
return false;
}
// TODO(ianh): Use a real YAML parser here
return !pubspec.readAsStringSync().contains('nodoc: true');
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment