Make log clear failures a warning

Summary:
Logcat can sometimes fail to clear the logs for some reason.
There's nothing we can do about this as we're directly calling out to adb.

Reviewed By: lawrencelomax

Differential Revision: D34749970

fbshipit-source-id: 2166717ace491f7b73b380576392638ef9276b78
This commit is contained in:
Pascal Hartig
2022-03-09 07:40:39 -08:00
committed by Facebook GitHub Bot
parent 9bd6c7f54a
commit 71bdb23a1d

View File

@@ -91,7 +91,9 @@ export default class AndroidDevice extends ServerDevice {
}
clearLogs(): Promise<void> {
return this.executeShellOrDie(['logcat', '-c']);
return this.executeShellOrDie(['logcat', '-c']).catch((e) => {
console.warn('Failed to clear logs:', e);
});
}
async navigateToLocation(location: string) {