Skip to content

Commit e189542

Browse files
Merge pull request #11 from NativeScript/milanov/fix-android-check-on-mac
Fix android -h check on mac
2 parents 87c2918 + 64a088c commit e189542

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
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;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-doctor",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Library that helps identifying if the environment can be used for development of {N} apps.",
55
"main": "lib/index.js",
66
"types": "./typings/nativescript-doctor.d.ts",

0 commit comments

Comments
 (0)