mirror of
https://code.forgejo.org/actions/setup-python
synced 2025-06-09 04:42:20 +02:00
Add error handling for saving and restoring cache (#618)
This commit is contained in:
parent
b41aaf9f0c
commit
03eb867e3d
8 changed files with 694 additions and 1056 deletions
|
@ -43,7 +43,16 @@ async function saveCache(packageManager: string) {
|
|||
return;
|
||||
}
|
||||
|
||||
const cacheId = await cache.saveCache(cachePaths, primaryKey);
|
||||
let cacheId = 0;
|
||||
|
||||
try {
|
||||
cacheId = await cache.saveCache(cachePaths, primaryKey);
|
||||
} catch (err) {
|
||||
const message = (err as Error).message;
|
||||
core.info(`[warning]${message}`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (cacheId == -1) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue