From 0eb0524ccb07cb8dab04d6fddacd5d1b2975d25e Mon Sep 17 00:00:00 2001 From: Christopher Williams Date: Thu, 10 Dec 2020 11:15:37 -0500 Subject: [PATCH] test: guard adb path generation to android platform --- tests/plugins/mocha.test.support/hooks/hook.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/plugins/mocha.test.support/hooks/hook.js b/tests/plugins/mocha.test.support/hooks/hook.js index 2f0a02c319f..99d35371c10 100644 --- a/tests/plugins/mocha.test.support/hooks/hook.js +++ b/tests/plugins/mocha.test.support/hooks/hook.js @@ -22,10 +22,11 @@ exports.init = (logger, config, cli) => { ANDROID_SDK = cli.argv['android-sdk']; } - // Set ADB path - ADB_PATH = path.join(ANDROID_SDK, 'platform-tools', 'adb'); - cli.on('build.pre.compile', async (builder, done) => { + if (builder.platformName === 'android') { + // Set ADB path + ADB_PATH = path.join(ANDROID_SDK, 'platform-tools', 'adb'); + } builder.tiapp.properties['Ti.version'] = { type: 'string', value: builder.titaniumSdkVersion }; builder.tiapp.properties['js.encrypted'] = { type: 'bool', value: builder.encryptJS }; done();