diff --git a/lib/src/analyze/package_api_analyzer.dart b/lib/src/analyze/package_api_analyzer.dart index cfe15bc..230821c 100644 --- a/lib/src/analyze/package_api_analyzer.dart +++ b/lib/src/analyze/package_api_analyzer.dart @@ -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