Skip to content

Commit

Permalink
check for pubspec instead of lib/ (#107968)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasguerrero authored Jul 21, 2022
1 parent 8d33ce1 commit fc3471f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/flutter_tools/lib/src/flutter_cache.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_tools/test/general.shard/cache_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fc3471f

Please sign in to comment.