Skip to content

Commit

Permalink
Enable preconfiguring --power for scala-cli (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gedochao committed Feb 22, 2023
1 parent 0bf064f commit 3eb28d3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions action.yml
Expand Up @@ -20,6 +20,10 @@ inputs:
description: 'Coursier version to install'
required: false
default: ''
power:
description: 'Value for the --power launcher option'
required: false
default: 'false'
outputs:
cs-version:
description: 'Version of the installed Coursier'
Expand Down
7 changes: 7 additions & 0 deletions src/main.ts
Expand Up @@ -124,6 +124,13 @@ async function run(): Promise<void> {
)
}
})
await core.group('Config --power', async () => {
const powerInput = core.getInput('power').trim()
const isPower = powerInput === 'true'
if (isPower) {
await execOutput('scala-cli', 'config', 'power', 'true')
}
})
} catch (error: unknown) {
const msg = error instanceof Error ? error.message : String(error)
core.setFailed(msg)
Expand Down

0 comments on commit 3eb28d3

Please sign in to comment.