Fixes a common crash in getAdbDevices when adb executable isn't found. (#22676)

Apparently, this accounts for 13% of our crashes in Beta.
This commit is contained in:
Greg Spencer
2018-10-04 15:57:15 -07:00
committed by GitHub
parent cfc73590b7
commit 40a7a9cfc3
3 changed files with 25 additions and 2 deletions

View File

@@ -84,7 +84,7 @@ void updateFileModificationTime(String path,
}
/// Matcher for functions that throw [ToolExit].
Matcher throwsToolExit({int exitCode, String message}) {
Matcher throwsToolExit({int exitCode, Pattern message}) {
Matcher matcher = isToolExit;
if (exitCode != null)
matcher = allOf(matcher, (ToolExit e) => e.exitCode == exitCode);