Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
ba309b26
Commit
ba309b26
authored
Dec 06, 2016
by
Dan Rubel
Committed by
GitHub
Dec 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
degrade gracefully if flutter doctor cannot read directory (#7167)
parent
a3183a4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
7 deletions
+25
-7
doctor.dart
packages/flutter_tools/lib/src/doctor.dart
+25
-7
No files found.
packages/flutter_tools/lib/src/doctor.dart
View file @
ba309b26
...
...
@@ -404,16 +404,25 @@ class IntelliJValidatorOnMac extends IntelliJValidator {
});
}
for
(
FileSystemEntity
dir
in
new
Directory
(
'/Applications'
).
listSync
())
{
if
(
dir
is
Directory
)
{
checkForIntelliJ
(
dir
);
if
(!
dir
.
path
.
endsWith
(
'.app'
))
{
for
(
FileSystemEntity
subdir
in
dir
.
listSync
())
{
if
(
subdir
is
Directory
)
checkForIntelliJ
(
subdir
);
try
{
for
(
FileSystemEntity
dir
in
new
Directory
(
'/Applications'
).
listSync
())
{
if
(
dir
is
Directory
)
{
checkForIntelliJ
(
dir
);
if
(!
dir
.
path
.
endsWith
(
'.app'
))
{
for
(
FileSystemEntity
subdir
in
dir
.
listSync
())
{
if
(
subdir
is
Directory
)
checkForIntelliJ
(
subdir
);
}
}
}
}
}
on
FileSystemException
catch
(
e
)
{
validators
.
add
(
new
ValidatorWithResult
(
'Cannot determine if IntelliJ is installed'
,
new
ValidationResult
(
ValidationType
.
missing
,
<
ValidationMessage
>[
new
ValidationMessage
.
error
(
e
.
message
),
]),
));
}
return
validators
;
}
...
...
@@ -468,3 +477,12 @@ class DeviceValidator extends DoctorValidator {
return
new
ValidationResult
(
ValidationType
.
installed
,
messages
);
}
}
class
ValidatorWithResult
extends
DoctorValidator
{
final
ValidationResult
result
;
ValidatorWithResult
(
String
title
,
this
.
result
)
:
super
(
title
);
@override
Future
<
ValidationResult
>
validate
()
async
=>
result
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment