search for IntelliJ on Mac in /Application and sub folders 1 level deep (#6419)
This commit is contained in:
@@ -430,15 +430,26 @@ class IntelliJValidatorOnMac extends IntelliJValidator {
|
||||
|
||||
static Iterable<DoctorValidator> get installed {
|
||||
List<DoctorValidator> validators = <DoctorValidator>[];
|
||||
|
||||
void checkForIntelliJ(Directory dir) {
|
||||
String name = path.basename(dir.path);
|
||||
_dirNameToId.forEach((String dirName, String id) {
|
||||
if (name == dirName) {
|
||||
String title = IntelliJValidator._idToTitle[id];
|
||||
validators.add(new IntelliJValidatorOnMac(title, id, dir.path));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
for (FileSystemEntity dir in new Directory('/Applications').listSync()) {
|
||||
if (dir is Directory) {
|
||||
String name = path.basename(dir.path);
|
||||
_dirNameToId.forEach((String dirName, String id) {
|
||||
if (name == dirName) {
|
||||
String title = IntelliJValidator._idToTitle[id];
|
||||
validators.add(new IntelliJValidatorOnMac(title, id, dir.path));
|
||||
checkForIntelliJ(dir);
|
||||
if (!dir.path.endsWith('.app')) {
|
||||
for (FileSystemEntity subdir in dir.listSync()) {
|
||||
if (subdir is Directory)
|
||||
checkForIntelliJ(subdir);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return validators;
|
||||
|
||||
Reference in New Issue
Block a user