[flutter_tools] pub get skips example dir if there is no pubspec.yaml (#74264)

This commit is contained in:
Jonah Williams
2021-01-19 15:02:36 -08:00
committed by GitHub
parent ba66d7d808
commit d325705332
2 changed files with 21 additions and 1 deletions

View File

@@ -164,7 +164,7 @@ class PackagesGetCommand extends FlutterCommand {
await rootProject.regeneratePlatformSpecificTooling();
// Get/upgrade packages in example app as well
if (rootProject.hasExampleApp) {
if (rootProject.hasExampleApp && rootProject.example.pubspecFile.existsSync()) {
final FlutterProject exampleProject = rootProject.example;
await _runPubGet(exampleProject.directory.path, exampleProject);
await exampleProject.regeneratePlatformSpecificTooling();