mirror of
https://gitea.com/actions/setup-python.git
synced 2025-09-19 01:58:27 +08:00
Add error handling for saving and restoring cache (#618)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user