From 449627e76be066c571de212efcc3ac9d706f18d9 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Tue, 21 Nov 2023 21:22:57 +0200 Subject: [PATCH] Format file to match correct "desired" width. Remove leftover debug printout --- dist/index.js | 1 - src/main.ts | 27 ++++++++++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index 8c55e70..10c6273 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6689,7 +6689,6 @@ function installSdkManager() { } } if (!fs.existsSync(sdkManagerExe)) { - core.info('Preinstalled sdkmanager not found.'); let cmdlineToolsURL; if (process.platform === 'linux') { cmdlineToolsURL = COMMANDLINE_TOOLS_LIN_URL; diff --git a/src/main.ts b/src/main.ts index a7c4f48..2f48294 100644 --- a/src/main.ts +++ b/src/main.ts @@ -46,13 +46,28 @@ async function callSdkManager(sdkManager: string, arg: string): Promise { } async function installSdkManager(): Promise { - const cmdlineTools = path.join(ANDROID_SDK_ROOT, 'cmdline-tools', VERSION_SHORT) + const cmdlineTools = path.join( + ANDROID_SDK_ROOT, + 'cmdline-tools', + VERSION_SHORT + ) let sdkManagerExe = path.join(cmdlineTools, 'bin', 'sdkmanager') if (!fs.existsSync(sdkManagerExe)) { - const latestCmdlineTools = path.join(ANDROID_SDK_ROOT, 'cmdline-tools', 'latest') - const sourcePropertiesFile = path.join(latestCmdlineTools, 'source.properties') - const latestSdkManagerExe = path.join(latestCmdlineTools, 'bin', 'sdkmanager') + const latestCmdlineTools = path.join( + ANDROID_SDK_ROOT, + 'cmdline-tools', + 'latest' + ) + const sourcePropertiesFile = path.join( + latestCmdlineTools, + 'source.properties' + ) + const latestSdkManagerExe = path.join( + latestCmdlineTools, + 'bin', + 'sdkmanager' + ) if ( fs.existsSync(latestCmdlineTools) && fs.existsSync(sourcePropertiesFile) && @@ -100,7 +115,9 @@ async function installSdkManager(): Promise { } // touch $ANDROID_SDK_ROOT/repositories.cfg - fs.closeSync(fs.openSync(path.join(ANDROID_SDK_ROOT, 'repositories.cfg'), 'w')) + fs.closeSync( + fs.openSync(path.join(ANDROID_SDK_ROOT, 'repositories.cfg'), 'w') + ) core.debug(`sdkmanager available at: ${sdkManagerExe}`) return sdkManagerExe }