check for pubspec instead of lib/ (#107968)

This commit is contained in:
Jesús S Guerrero
2022-07-21 17:03:09 +00:00
committed by GitHub
parent 8d33ce13dc
commit fc3471fd28
2 changed files with 2 additions and 2 deletions

View File

@@ -98,7 +98,7 @@ class PubDependencies extends ArtifactSet {
return false;
}
for (final Package package in packageConfig.packages) {
if (!fileSystem.directory(package.packageUriRoot).existsSync()) {
if (!fileSystem.directory(package.root).childFile('pubspec.yaml').existsSync()) {
return false;
}
}

View File

@@ -936,7 +936,7 @@ void main() {
expect(await pubDependencies.isUpToDate(fileSystem), false); // dependencies are missing.
fileSystem.file('.pub-cache/hosted/pub.dartlang.org/example-7.0.0/lib/foo.dart')
fileSystem.file('.pub-cache/hosted/pub.dartlang.org/example-7.0.0/pubspec.yaml')
.createSync(recursive: true);
expect(await pubDependencies.isUpToDate(fileSystem), true);