Commit b7ceed6b authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Handle missing directories in the flutter doctor IntelliJ check (#9812)

parent 83a1054c
...@@ -422,7 +422,8 @@ class IntelliJValidatorOnMac extends IntelliJValidator { ...@@ -422,7 +422,8 @@ class IntelliJValidatorOnMac extends IntelliJValidator {
try { try {
final Iterable<FileSystemEntity> installDirs = installPaths final Iterable<FileSystemEntity> installDirs = installPaths
.map((String installPath) => fs.directory(installPath).listSync()) .map((String installPath) => fs.directory(installPath))
.map((Directory dir) => dir.existsSync() ? dir.listSync() : <FileSystemEntity>[])
.expand((List<FileSystemEntity> mappedDirs) => mappedDirs) .expand((List<FileSystemEntity> mappedDirs) => mappedDirs)
.where((FileSystemEntity mappedDir) => mappedDir is Directory); .where((FileSystemEntity mappedDir) => mappedDir is Directory);
for (FileSystemEntity dir in installDirs) { for (FileSystemEntity dir in installDirs) {
......
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