Skip to content

Commit

Permalink
fix: adb path detection on windows (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr authored and zamotany committed Aug 6, 2019
1 parent 2af69f9 commit ed34fd5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/android/adb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function getAdbPath(customPath?: string): string {

export function spawnLogcatProcess(adbPath: string): ChildProcess {
try {
execSync(`${adbPath} logcat -c`);
execSync(`'${adbPath}' logcat -c`);
} catch (error) {
throw new CodeError(
ERR_ANDROID_CANNOT_CLEAN_LOGCAT_BUFFER,
Expand All @@ -51,7 +51,9 @@ export function getApplicationPid(
): number {
let output: Buffer | undefined;
try {
output = execSync(`${getAdbPath(adbPath)} shell pidof -s ${applicationId}`);
output = execSync(
`'${getAdbPath(adbPath)}' shell pidof -s ${applicationId}`
);
} catch (error) {
throw new CodeError(
ERR_ANDROID_CANNOT_GET_APP_PID,
Expand Down

0 comments on commit ed34fd5

Please sign in to comment.