mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-14 13:50:33 +00:00
fix: clarify rust cache setup logs
This commit is contained in:
parent
17411053db
commit
533c03f222
3 changed files with 17 additions and 5 deletions
9
dist/index.js
generated
vendored
9
dist/index.js
generated
vendored
|
|
@ -89033,17 +89033,22 @@ async function setupRustCache() {
|
|||
warning('cache_rust is enabled, but cache is false. Rust cache setup is skipped.');
|
||||
return;
|
||||
}
|
||||
if (!getBooleanInput('cache_save')) {
|
||||
warning('cache_rust is enabled, but cache_save is false. Rust cache paths will be restored for this run but not saved.');
|
||||
}
|
||||
const { rustupHome, cargoHome } = rustCacheHomes();
|
||||
if (process.env.MISE_RUSTUP_HOME) {
|
||||
info(`mise rust cache: using MISE_RUSTUP_HOME=${rustupHome}`);
|
||||
info(`mise rust cache: using pre-set MISE_RUSTUP_HOME=${rustupHome}`);
|
||||
}
|
||||
else {
|
||||
info(`mise rust cache: exporting MISE_RUSTUP_HOME=${rustupHome}`);
|
||||
exportVariable('MISE_RUSTUP_HOME', rustupHome);
|
||||
}
|
||||
if (process.env.MISE_CARGO_HOME) {
|
||||
info(`mise rust cache: using MISE_CARGO_HOME=${cargoHome}`);
|
||||
info(`mise rust cache: using pre-set MISE_CARGO_HOME=${cargoHome}`);
|
||||
}
|
||||
else {
|
||||
info(`mise rust cache: exporting MISE_CARGO_HOME=${cargoHome}`);
|
||||
exportVariable('MISE_CARGO_HOME', cargoHome);
|
||||
}
|
||||
await fs.promises.mkdir(rustupHome, { recursive: true });
|
||||
|
|
|
|||
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
11
src/index.ts
11
src/index.ts
|
|
@ -167,18 +167,25 @@ async function setupRustCache(): Promise<void> {
|
|||
)
|
||||
return
|
||||
}
|
||||
if (!core.getBooleanInput('cache_save')) {
|
||||
core.warning(
|
||||
'cache_rust is enabled, but cache_save is false. Rust cache paths will be restored for this run but not saved.'
|
||||
)
|
||||
}
|
||||
|
||||
const { rustupHome, cargoHome } = rustCacheHomes()
|
||||
|
||||
if (process.env.MISE_RUSTUP_HOME) {
|
||||
core.info(`mise rust cache: using MISE_RUSTUP_HOME=${rustupHome}`)
|
||||
core.info(`mise rust cache: using pre-set MISE_RUSTUP_HOME=${rustupHome}`)
|
||||
} else {
|
||||
core.info(`mise rust cache: exporting MISE_RUSTUP_HOME=${rustupHome}`)
|
||||
core.exportVariable('MISE_RUSTUP_HOME', rustupHome)
|
||||
}
|
||||
|
||||
if (process.env.MISE_CARGO_HOME) {
|
||||
core.info(`mise rust cache: using MISE_CARGO_HOME=${cargoHome}`)
|
||||
core.info(`mise rust cache: using pre-set MISE_CARGO_HOME=${cargoHome}`)
|
||||
} else {
|
||||
core.info(`mise rust cache: exporting MISE_CARGO_HOME=${cargoHome}`)
|
||||
core.exportVariable('MISE_CARGO_HOME', cargoHome)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue