Change adb path resolution

Summary:
Quick drive-by change.

`path.resolve` accepts var-args so we don't resolve
to the wrong path on non-Unix systems.

Reviewed By: mweststrate

Differential Revision: D31502481

fbshipit-source-id: a963cd37d13eb8ef68bccf375f3e074fa8961a9e
This commit is contained in:
Pascal Hartig
2021-10-08 09:44:08 -07:00
committed by Facebook GitHub Bot
parent 92ec974040
commit 26ed0875cb

View File

@@ -31,7 +31,7 @@ export function getAdbClient(config: Config): Promise<Client> {
manually before requesting a client. */
async function createClient(config: Config): Promise<Client> {
const androidHome = config.androidHome;
const adbPath = path.resolve(androidHome, 'platform-tools/adb');
const adbPath = path.resolve(androidHome, 'platform-tools', 'adb');
return reportPlatformFailures<Client>(
execFile(adbPath, ['start-server']).then(() =>
adbkit.createClient(adbConfig()),