[flutter_tools] Fix TypeError when a FileSystemException happens during flutter doctor (#133373)

Fixes https://github.com/flutter/flutter/issues/133086
This commit is contained in:
Christopher Fujino
2023-09-05 11:00:07 -07:00
committed by GitHub
parent 6eca007a81
commit 85bece2689
6 changed files with 61 additions and 10 deletions

View File

@@ -487,8 +487,11 @@ class IntelliJValidatorOnMac extends IntelliJValidator {
// Remove JetBrains Toolbox link apps. These tiny apps just
// link to the full app, will get detected elsewhere in our search.
validators.removeWhere((DoctorValidator validator) {
if (validator is! IntelliJValidatorOnMac) {
return false;
}
final String identifierKey = plistParser.getValueFromFile(
(validator as IntelliJValidatorOnMac).plistFile,
validator.plistFile,
PlistParser.kCFBundleIdentifierKey,
) as String;
return identifierKey.contains('com.jetbrains.toolbox.linkapp');