diff --git a/package-lock.json b/package-lock.json index 475d164..219b002 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@nightwatch/mobile-helper", - "version": "0.0.1", + "version": "0.1.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@nightwatch/mobile-helper", - "version": "0.0.1", + "version": "0.1.3", "license": "MIT", "dependencies": { "ansi-colors": "^4.1.3", diff --git a/package.json b/package.json index 2c67dbd..a58ec53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nightwatch/mobile-helper", - "version": "0.1.2", + "version": "0.1.3", "description": "Easily setup all the requirements needed to get started with mobile-web testing using Nightwatch.", "main": "dist/index.js", "bin": "./index.js", diff --git a/src/commands/android/index.ts b/src/commands/android/index.ts index e549e40..26ce43a 100644 --- a/src/commands/android/index.ts +++ b/src/commands/android/index.ts @@ -61,6 +61,9 @@ export class AndroidSetup { const sdkRootEnv = this.getSdkRootFromEnv(); this.sdkRoot = sdkRootEnv || await this.getSdkRootFromUser(); + const originalAndroidHome = process.env.ANDROID_HOME; + process.env.ANDROID_HOME = this.sdkRoot; + const setupConfigs: SetupConfigs = await this.getSetupConfigs(this.options); Logger.log(); @@ -91,6 +94,8 @@ export class AndroidSetup { Logger.log(`${colors.bold('Note:')} Please make sure you have required browsers installed on your real-device before running tests.\n`); } + process.env.ANDROID_HOME = originalAndroidHome; + if (!sdkRootEnv) { this.sdkRootEnvSetInstructions(); }