Skip to content

Commit 3eb28d3

Browse files
authored
Enable preconfiguring --power for scala-cli (#180)
1 parent 0bf064f commit 3eb28d3

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ inputs:
2020
description: 'Coursier version to install'
2121
required: false
2222
default: ''
23+
power:
24+
description: 'Value for the --power launcher option'
25+
required: false
26+
default: 'false'
2327
outputs:
2428
cs-version:
2529
description: 'Version of the installed Coursier'

src/main.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ async function run(): Promise<void> {
124124
)
125125
}
126126
})
127+
await core.group('Config --power', async () => {
128+
const powerInput = core.getInput('power').trim()
129+
const isPower = powerInput === 'true'
130+
if (isPower) {
131+
await execOutput('scala-cli', 'config', 'power', 'true')
132+
}
133+
})
127134
} catch (error: unknown) {
128135
const msg = error instanceof Error ? error.message : String(error)
129136
core.setFailed(msg)

0 commit comments

Comments
 (0)