Skip to content

Commit

Permalink
Check if the "lib" directory exists before iterating its sub-tree (#196)
Browse files Browse the repository at this point in the history
* Check if the "lib" directory exists before iterating its sub-tree

* bump flutter version to 3.24.3
  • Loading branch information
devmil authored Nov 7, 2024
1 parent ef2e484 commit aa3a499
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .fvmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"flutter": "3.22.2",
"flutter": "3.24.3",
"flavors": {}
}
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 aa3a499

Please sign in to comment.