[macOS] Flavors project throws no flavor specified for creating a project. (#113979)

This commit is contained in:
Alex Wallen
2022-10-25 09:50:50 -10:00
committed by GitHub
parent b373be8891
commit 92d8b04bac
2 changed files with 21 additions and 3 deletions

View File

@@ -138,9 +138,16 @@ class FlutterProject {
// Don't require iOS build info, this method is only
// used during create as best-effort, use the
// default target bundle identifier.
final String? bundleIdentifier = await ios.productBundleIdentifier(null);
if (bundleIdentifier != null) {
candidates.add(bundleIdentifier);
try {
final String? bundleIdentifier = await ios.productBundleIdentifier(null);
if (bundleIdentifier != null) {
candidates.add(bundleIdentifier);
}
} on ToolExit {
// It's possible that while parsing the build info for the ios project
// that the bundleIdentifier can't be resolve. However, we would like
// skip parsing that id in favor of searching in other place. We can
// consider a tool exit in this case to be non fatal for the program.
}
}
if (android.existsSync()) {