Reduce error spam from adb start-server
Summary: We do have a fall-back for this so there's no need to give this error or even warning treatment. If the fallback fails, we already have a warning. Reviewed By: mweststrate Differential Revision: D26547277 fbshipit-source-id: 96ac91def7e6e111d32d3536d8796f347d6c519d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c70d97accf
commit
11d2871893
@@ -8,8 +8,7 @@
|
||||
*/
|
||||
|
||||
import {reportPlatformFailures} from './metrics';
|
||||
import {promisify} from 'util';
|
||||
import child_process from 'child_process';
|
||||
import {exec} from 'promisify-child-process';
|
||||
import promiseRetry from 'promise-retry';
|
||||
import adbConfig from '../utils/adbConfig';
|
||||
import adbkit, {Client} from 'adbkit';
|
||||
@@ -33,12 +32,12 @@ function createClient(store: Store): Promise<Client> {
|
||||
const androidHome = store.getState().settingsState.androidHome;
|
||||
const adbPath = path.resolve(androidHome, 'platform-tools/adb');
|
||||
return reportPlatformFailures<Client>(
|
||||
promisify(child_process.exec)(`${adbPath} start-server`).then(() =>
|
||||
exec(`${adbPath} start-server`).then(() =>
|
||||
adbkit.createClient(adbConfig()),
|
||||
),
|
||||
'createADBClient.shell',
|
||||
).catch((err) => {
|
||||
console.error(
|
||||
console.log(
|
||||
'Failed to create adb client using shell adb command. Trying with adbkit.\n' +
|
||||
err.toString(),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user