forked from firka/flutter
Fix flutter doctor usage of eglinfo in failure cases. (#164334)
Ignore return value from eglinfo - it doesn't indicate failure. Discovered when using an X11 system where Wayland is not available. It returns 1 in this case, but the output is still valid. Confirmed by looking at the eglinfo source - we should parse the output regardless of what it returns. Catch exception correctly when eglinfo is not installed. Fixes for https://github.com/flutter/flutter/pull/163980
This commit is contained in:
@@ -43,8 +43,12 @@ class _DriverInformation {
|
||||
result = await _processManager.run(<String>['eglinfo'], stdoutEncoding: utf8);
|
||||
} on ArgumentError {
|
||||
// ignore error.
|
||||
} on ProcessException {
|
||||
return false;
|
||||
}
|
||||
if (result == null || result.exitCode != 0) {
|
||||
// result.exitCode is ignored, as this is non-zero if some platforms are not avaiable.
|
||||
// The output information is still parsable in all cases.
|
||||
if (result == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user