Call sdkmanager, not .bat on windows too, it just works

This commit is contained in:
Vilius Sutkus '89 2021-02-03 03:35:41 +02:00 committed by Dave Olsthoorn
parent 1edf194eee
commit 6bde8445cd

View file

@ -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(): {