Commit 28384787 authored by Dan Rubel's avatar Dan Rubel Committed by GitHub

search for IntelliJ on Mac in /Application and sub folders 1 level deep (#6419)

parent 91128238
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment