Skip to content

Commit

Permalink
fix: don't print retry message for --json (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Jun 4, 2021
1 parent 85bf106 commit 4fb0563
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/android/utils/adb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,13 @@ export async function execAdb(
let timer: NodeJS.Timer | undefined;

const retry = async () => {
process.stderr.write(
`ADB is unresponsive after ${options.timeout}ms, killing server and retrying...\n`,
);
const msg = `ADBs is unresponsive after ${options.timeout}ms, killing server and retrying...\n`;
if (process.argv.includes('--json')) {
debug(msg);
} else {
process.stderr.write(msg);
}

debug(
'ADB timeout of %O reached, killing server and retrying...',
options.timeout,
Expand Down

0 comments on commit 4fb0563

Please sign in to comment.