mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-18 15:31:54 +00:00
Adding Setting of Necessary Environment Variables Before Running rtx (#123)
* Fixing typo in outputs of action.yml * Adding `setEnvVars` step for env vars that should always be set in the action
This commit is contained in:
parent
43ea57b96e
commit
10114e7e8a
4 changed files with 24 additions and 2 deletions
9
dist/index.js
generated
vendored
9
dist/index.js
generated
vendored
|
|
@ -43,11 +43,20 @@ async function run() {
|
|||
await setToolVersions();
|
||||
await restoreRTXCache();
|
||||
await setupRTX();
|
||||
await setEnvVars();
|
||||
await exec.exec('rtx', ['--version']);
|
||||
await exec.exec('rtx', ['install']);
|
||||
await setPaths();
|
||||
}
|
||||
exports.run = run;
|
||||
async function setEnvVars() {
|
||||
if (!process.env['RTX_TRUSTED_CONFIG_PATHS']) {
|
||||
core.exportVariable('RTX_TRUSTED_CONFIG_PATHS', path.join(process.cwd(), '.rtx.toml'));
|
||||
}
|
||||
if (!process.env['RTX_YES']) {
|
||||
core.exportVariable('RTX_YES', 'yes');
|
||||
}
|
||||
}
|
||||
async function restoreRTXCache() {
|
||||
const cachePath = (0, utils_1.rtxDir)();
|
||||
const fileHash = await glob.hashFiles(`**/.tool-versions\n**/.rtx.toml`);
|
||||
|
|
|
|||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue