Skip to content

Commit

Permalink
Fix read pub spec
Browse files Browse the repository at this point in the history
  • Loading branch information
rehlma committed Oct 8, 2024
1 parent 94a8942 commit d89e62d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/version_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ class VersionParser {

YamlMap? _readPubspecFile(Directory packagePath) {
try {
final package = DartPackage.fromDirectory(packagePath);
final pubspecFile = package?.pubspec;
if (pubspecFile == null || !pubspecFile.existsSync()) {
final normalizedDir = Directory(normalize(packagePath.path));
final pubspecFile = normalizedDir.file('pubspec.yaml');
if (!pubspecFile.existsSync()) {
print('pubspec.yaml not found in the package directory');
return null;
}
Expand Down

0 comments on commit d89e62d

Please sign in to comment.