mirror of
https://github.com/android-actions/setup-android
synced 2024-11-22 13:29:35 -08:00
Fix path to sdkmanager for all platforms
This commit is contained in:
parent
7b2dad077d
commit
6bb81b1f40
2 changed files with 5 additions and 5 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
|
@ -41,11 +41,11 @@ async function install(): Promise<string> {
|
|||
} else if (process.platform === 'darwin') {
|
||||
const cmdlineToolsZip = await tc.downloadTool(COMMANDLINE_TOOLS_MAC_URL)
|
||||
const cmdlineTools = await tc.extractZip(cmdlineToolsZip)
|
||||
sdkManager = path.join(cmdlineTools, 'tools', 'bin', 'sdkmanager')
|
||||
sdkManager = path.join(cmdlineTools, 'cmdline-tools', 'bin', 'sdkmanager')
|
||||
} else if (process.platform === 'win32') {
|
||||
const cmdlineToolsZip = await tc.downloadTool(COMMANDLINE_TOOLS_WIN_URL)
|
||||
const cmdlineTools = await tc.extractZip(cmdlineToolsZip)
|
||||
sdkManager = path.join(cmdlineTools, 'tools', 'bin', 'sdkmanager.bat')
|
||||
sdkManager = path.join(cmdlineTools, 'cmdline-tools', 'bin', 'sdkmanager.bat')
|
||||
} else {
|
||||
core.error(`Unsupported platform: ${process.platform}`)
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ async function install(): Promise<string> {
|
|||
|
||||
await exec.exec(
|
||||
sdkManager,
|
||||
['--include_obsolete', `--sdk_root=${ANDROID_SDK_ROOT}`, 'tools'],
|
||||
['--include_obsolete', `--sdk_root=${ANDROID_SDK_ROOT}`, 'cmdline-tools'],
|
||||
{input: acceptBuffer}
|
||||
)
|
||||
|
||||
|
@ -71,7 +71,7 @@ async function run(): Promise<void> {
|
|||
core.exportVariable('ANDROID_HOME', ANDROID_SDK_ROOT)
|
||||
core.exportVariable('ANDROID_SDK_ROOT', ANDROID_SDK_ROOT)
|
||||
|
||||
core.addPath(path.join(ANDROID_SDK_ROOT, 'tools', 'bin'))
|
||||
core.addPath(path.join(ANDROID_SDK_ROOT, 'cmdline-tools', 'bin'))
|
||||
core.addPath(path.join(ANDROID_SDK_ROOT, 'platform-tools'))
|
||||
|
||||
core.debug('add matchers')
|
||||
|
|
Loading…
Reference in a new issue