fix: clarify rust cache setup logs

This commit is contained in:
Taku Kodma 2026-05-10 20:32:12 +10:00
parent 17411053db
commit 533c03f222
No known key found for this signature in database
GPG key ID: 2FA149ECEAB1E16D
3 changed files with 17 additions and 5 deletions

9
dist/index.js generated vendored
View file

@ -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

File diff suppressed because one or more lines are too long

View file

@ -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)
}