Log an error if the Android intent fails during flutter refresh (#3988)

This commit is contained in:
Jason Simmons 2016-05-17 14:35:11 -07:00
parent f284c1a049
commit fc61060421

View File

@ -409,7 +409,14 @@ class AndroidDevice extends Device {
'--es', 'snapshot', _deviceSnapshotPath,
activity,
]);
runCheckedSync(cmd);
RegExp errorRegExp = new RegExp(r'^Error: .*$', multiLine: true);
Match errorMatch = errorRegExp.firstMatch(runCheckedSync(cmd));
if (errorMatch != null) {
printError(errorMatch.group(0));
return false;
}
return true;
}