Refactor "no ios devices attached" logic. (#27717)

This commit is contained in:
KyleWong 2019-02-12 10:14:01 +08:00 committed by GitHub
parent 23d38901ef
commit bf20fa7c9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,7 +114,7 @@ class IMobileDevice {
// If no device is attached, we're unable to detect any problems. Assume all is well.
final ProcessResult result = (await runAsync(<String>['idevice_id', '-l'])).processResult;
if (result.exitCode != 0 || result.stdout.isEmpty)
if (result.exitCode == 0 && result.stdout.isEmpty)
return true;
// Check that we can look up the names of any attached devices.