mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-20 16:21:53 +00:00
fix: show message when saving cache
This commit is contained in:
parent
746b22c6c6
commit
4a07a7ced0
3 changed files with 20 additions and 16 deletions
18
dist/index.js
generated
vendored
18
dist/index.js
generated
vendored
|
|
@ -66760,14 +66760,16 @@ function miseDir() {
|
|||
return path.join(os.homedir(), '.local', 'share', 'mise');
|
||||
}
|
||||
async function saveCache(cacheKey) {
|
||||
const cachePath = miseDir();
|
||||
if (!fs.existsSync(cachePath)) {
|
||||
throw new Error(`Cache folder path does not exist on disk: ${cachePath}`);
|
||||
}
|
||||
const cacheId = await cache.saveCache([cachePath], cacheKey);
|
||||
if (cacheId === -1)
|
||||
return;
|
||||
core.info(`Cache saved from ${cachePath} with key: ${cacheKey}`);
|
||||
core.group(`Saving mise cache`, async () => {
|
||||
const cachePath = miseDir();
|
||||
if (!fs.existsSync(cachePath)) {
|
||||
throw new Error(`Cache folder path does not exist on disk: ${cachePath}`);
|
||||
}
|
||||
const cacheId = await cache.saveCache([cachePath], cacheKey);
|
||||
if (cacheId === -1)
|
||||
return;
|
||||
core.info(`Cache saved from ${cachePath} with key: ${cacheKey}`);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
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