Skip to content

Commit 449627e

Browse files
Format file to match correct "desired" width. Remove leftover debug printout
1 parent 8023252 commit 449627e

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

dist/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6689,7 +6689,6 @@ function installSdkManager() {
66896689
}
66906690
}
66916691
if (!fs.existsSync(sdkManagerExe)) {
6692-
core.info('Preinstalled sdkmanager not found.');
66936692
let cmdlineToolsURL;
66946693
if (process.platform === 'linux') {
66956694
cmdlineToolsURL = COMMANDLINE_TOOLS_LIN_URL;

src/main.ts

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,28 @@ async function callSdkManager(sdkManager: string, arg: string): Promise<void> {
4646
}
4747

4848
async function installSdkManager(): Promise<string> {
49-
const cmdlineTools = path.join(ANDROID_SDK_ROOT, 'cmdline-tools', VERSION_SHORT)
49+
const cmdlineTools = path.join(
50+
ANDROID_SDK_ROOT,
51+
'cmdline-tools',
52+
VERSION_SHORT
53+
)
5054
let sdkManagerExe = path.join(cmdlineTools, 'bin', 'sdkmanager')
5155

5256
if (!fs.existsSync(sdkManagerExe)) {
53-
const latestCmdlineTools = path.join(ANDROID_SDK_ROOT, 'cmdline-tools', 'latest')
54-
const sourcePropertiesFile = path.join(latestCmdlineTools, 'source.properties')
55-
const latestSdkManagerExe = path.join(latestCmdlineTools, 'bin', 'sdkmanager')
57+
const latestCmdlineTools = path.join(
58+
ANDROID_SDK_ROOT,
59+
'cmdline-tools',
60+
'latest'
61+
)
62+
const sourcePropertiesFile = path.join(
63+
latestCmdlineTools,
64+
'source.properties'
65+
)
66+
const latestSdkManagerExe = path.join(
67+
latestCmdlineTools,
68+
'bin',
69+
'sdkmanager'
70+
)
5671
if (
5772
fs.existsSync(latestCmdlineTools) &&
5873
fs.existsSync(sourcePropertiesFile) &&
@@ -100,7 +115,9 @@ async function installSdkManager(): Promise<string> {
100115
}
101116

102117
// touch $ANDROID_SDK_ROOT/repositories.cfg
103-
fs.closeSync(fs.openSync(path.join(ANDROID_SDK_ROOT, 'repositories.cfg'), 'w'))
118+
fs.closeSync(
119+
fs.openSync(path.join(ANDROID_SDK_ROOT, 'repositories.cfg'), 'w')
120+
)
104121
core.debug(`sdkmanager available at: ${sdkManagerExe}`)
105122
return sdkManagerExe
106123
}

0 commit comments

Comments
 (0)