Skip to content

Commit fc3471f

Browse files
authored
check for pubspec instead of lib/ (#107968)
1 parent 8d33ce1 commit fc3471f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/flutter_tools/lib/src/flutter_cache.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class PubDependencies extends ArtifactSet {
9898
return false;
9999
}
100100
for (final Package package in packageConfig.packages) {
101-
if (!fileSystem.directory(package.packageUriRoot).existsSync()) {
101+
if (!fileSystem.directory(package.root).childFile('pubspec.yaml').existsSync()) {
102102
return false;
103103
}
104104
}

packages/flutter_tools/test/general.shard/cache_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ void main() {
936936

937937
expect(await pubDependencies.isUpToDate(fileSystem), false); // dependencies are missing.
938938

939-
fileSystem.file('.pub-cache/hosted/pub.dartlang.org/example-7.0.0/lib/foo.dart')
939+
fileSystem.file('.pub-cache/hosted/pub.dartlang.org/example-7.0.0/pubspec.yaml')
940940
.createSync(recursive: true);
941941

942942
expect(await pubDependencies.isUpToDate(fileSystem), true);

0 commit comments

Comments
 (0)