From 6bde8445cd6cf48aaed81a681f14f66c4250f394 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Wed, 3 Feb 2021 03:35:41 +0200 Subject: [PATCH] Call sdkmanager, not .bat on windows too, it just works --- src/main.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main.ts b/src/main.ts index 8d328bf..c153f2d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -19,16 +19,13 @@ const ANDROID_SDK_ROOT = process.env['ANDROID_SDK_ROOT'] || ANDROID_HOME_SDK_DIR const ANDROID_REPOSITORIES_CFG = path.join(ANDROID_SDK_ROOT, 'repositories.cfg') function getSdkManagerPath(cmdToolsVersion: string): string { - const toolsBinDir = path.join( + return path.join( ANDROID_SDK_ROOT, 'cmdline-tools', cmdToolsVersion, - 'bin' + 'bin', + 'sdkmanager' ) - if ('win32' === process.platform) { - return path.join(toolsBinDir, 'sdkmanager.bat') - } - return path.join(toolsBinDir, 'sdkmanager') } function findPreinstalledSdkManager(): {