Skip to content

Commit 267db19

Browse files
committed
Quieten down ADB ENOENT logging
1 parent 03a1141 commit 267db19

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/interceptors/android/adb-commands.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,15 @@ export function createAdbClient() {
4242

4343
// We listen for errors and report them. This only happens if adbkit completely
4444
// fails to handle or listen to a connection error. We'd rather report that than crash.
45-
client.on('error', logError);
45+
client.on('error', (e) => {
46+
if (isErrorLike(e) && e.code === 'ENOENT') {
47+
// No ADB available - that's fine, not notable at all
48+
return;
49+
}
50+
51+
console.log('ADB client error:', e.message ?? e);
52+
logError(e);
53+
});
4654

4755
return client;
4856
}

0 commit comments

Comments
 (0)