mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-14 22:00:34 +00:00
fix: create rust cache dirs asynchronously
This commit is contained in:
parent
a09f8173fa
commit
17411053db
3 changed files with 9 additions and 9 deletions
8
dist/index.js
generated
vendored
8
dist/index.js
generated
vendored
|
|
@ -88921,7 +88921,7 @@ async function run() {
|
|||
try {
|
||||
await setToolVersions();
|
||||
await setMiseToml();
|
||||
setupRustCache();
|
||||
await setupRustCache();
|
||||
let cacheKey;
|
||||
if (getBooleanInput('cache')) {
|
||||
cacheKey = await restoreMiseCache();
|
||||
|
|
@ -89025,7 +89025,7 @@ function setupWings() {
|
|||
* workflows that use rust-cache, rustup, setup-rust-toolchain, or another
|
||||
* Rust setup action outside of mise.
|
||||
*/
|
||||
function setupRustCache() {
|
||||
async function setupRustCache() {
|
||||
if (!getBooleanInput('cache_rust')) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -89046,8 +89046,8 @@ function setupRustCache() {
|
|||
else {
|
||||
exportVariable('MISE_CARGO_HOME', cargoHome);
|
||||
}
|
||||
fs.mkdirSync(rustupHome, { recursive: true });
|
||||
fs.mkdirSync(cargoHome, { recursive: true });
|
||||
await fs.promises.mkdir(rustupHome, { recursive: true });
|
||||
await fs.promises.mkdir(cargoHome, { recursive: true });
|
||||
info('mise rust cache: enabled. mise-managed rustup and cargo homes will be restored and saved with the mise cache.');
|
||||
}
|
||||
async function exportMiseEnv() {
|
||||
|
|
|
|||
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
|
|
@ -46,7 +46,7 @@ async function run(): Promise<void> {
|
|||
try {
|
||||
await setToolVersions()
|
||||
await setMiseToml()
|
||||
setupRustCache()
|
||||
await setupRustCache()
|
||||
|
||||
let cacheKey: string | undefined
|
||||
if (core.getBooleanInput('cache')) {
|
||||
|
|
@ -156,7 +156,7 @@ function setupWings(): void {
|
|||
* workflows that use rust-cache, rustup, setup-rust-toolchain, or another
|
||||
* Rust setup action outside of mise.
|
||||
*/
|
||||
function setupRustCache(): void {
|
||||
async function setupRustCache(): Promise<void> {
|
||||
if (!core.getBooleanInput('cache_rust')) {
|
||||
return
|
||||
}
|
||||
|
|
@ -182,8 +182,8 @@ function setupRustCache(): void {
|
|||
core.exportVariable('MISE_CARGO_HOME', cargoHome)
|
||||
}
|
||||
|
||||
fs.mkdirSync(rustupHome, { recursive: true })
|
||||
fs.mkdirSync(cargoHome, { recursive: true })
|
||||
await fs.promises.mkdir(rustupHome, { recursive: true })
|
||||
await fs.promises.mkdir(cargoHome, { recursive: true })
|
||||
|
||||
core.info(
|
||||
'mise rust cache: enabled. mise-managed rustup and cargo homes will be restored and saved with the mise cache.'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue