Add install option to skip rtx install (#146)

This commit is contained in:
Yuya Kusakabe 2023-09-15 09:49:51 +09:00 committed by GitHub
parent 0e1fc71c4a
commit 50bd58fbe0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 3 deletions

View file

@ -8,6 +8,10 @@ inputs:
tool_versions:
required: false
description: If present, this value will be written to the .tool-versions file
install:
required: false
default: true
description: 'if false, will not run `rtx install`'
outputs:
cache-hit:
description: 'A boolean value to indicate if a cache was hit.'

5
dist/index.js generated vendored
View file

@ -45,7 +45,10 @@ async function run() {
await setupRTX();
await setEnvVars();
await exec.exec('rtx', ['--version']);
await exec.exec('rtx', ['install']);
const install = core.getBooleanInput('install', { required: false });
if (install) {
await exec.exec('rtx', ['install']);
}
await setPaths();
}
exports.run = run;

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View file

@ -13,7 +13,10 @@ async function run(): Promise<void> {
await setupRTX()
await setEnvVars()
await exec.exec('rtx', ['--version'])
await exec.exec('rtx', ['install'])
const install = core.getBooleanInput('install', {required: false})
if (install) {
await exec.exec('rtx', ['install'])
}
await setPaths()
}