Fix bug in docs.dart (#72544)
Add a check that a pubspec file exists before trying to read it.
This commit is contained in:
parent
1c530a92ac
commit
9a9339fbcb
@ -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');
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user