Skip to content

Commit eb59e73

Browse files
Fix check for android on mac
1 parent 87c2918 commit eb59e73

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/sys-info.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ export class SysInfo implements NativeScriptDoctor.ISysInfo {
183183
}
184184

185185
try {
186-
const output = await this.childProcess.spawnFromEvent(pathToAndroid, ["-h"], "close");
186+
// On mac android -h returns exit code 1. That's why we need to ignore the error.
187+
const output = await this.childProcess.spawnFromEvent(pathToAndroid, ["-h"], "close", { ignoreError: true });
187188
if (output) {
188189
output.stdout = output.stdout || '';
189190
this.androidInstalledCache = output.stdout.indexOf("android") >= 0;

0 commit comments

Comments
 (0)