Skip to content

Commit

Permalink
Check if the "lib" directory exists before iterating its sub-tree
Browse files Browse the repository at this point in the history
  • Loading branch information
devmil committed Oct 26, 2024
1 parent ef2e484 commit e69fd9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/analyze/package_api_analyzer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@ class PackageApiAnalyzer {

Iterable<_FileToAnalyzeEntry> _findPublicFilesInProject(
String normalizedAbsolutePath) {
if (!Directory(normalizedAbsolutePath).existsSync()) {
return [];
}
final srcPath = path.join(normalizedAbsolutePath, 'src');
return Directory(normalizedAbsolutePath)
// if we want to consider all files that are not in the src folder as potential entry points
Expand Down

0 comments on commit e69fd9d

Please sign in to comment.