mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 14:34:21 +02:00
Treat error from restoring the cache as a cache miss (#68)
* Don't retry or error out on restore cache errors Co-authored-by: Eliza Brock Marcum <eliza@elizamarcum.com>
This commit is contained in:
co-authored by
Eliza Brock Marcum
parent
973b1baf94
commit
1bb7de255b
+11
-1
@@ -2427,7 +2427,17 @@ async function bundleInstall(platform, engine, version) {
|
||||
console.log(`Cache key: ${key}`)
|
||||
|
||||
// restore cache & install
|
||||
const cachedKey = await cache.restoreCache(paths, key, restoreKeys)
|
||||
let cachedKey = null
|
||||
try {
|
||||
cachedKey = await cache.restoreCache(paths, key, restoreKeys)
|
||||
} catch (error) {
|
||||
if (error.name === cache.ValidationError.name) {
|
||||
throw error;
|
||||
} else {
|
||||
core.info(`[warning] There was an error restoring the cache ${error.message}`)
|
||||
}
|
||||
}
|
||||
|
||||
if (cachedKey) {
|
||||
console.log(`Found cache for key: ${cachedKey}`)
|
||||
}
|
||||
|
||||
@@ -241,7 +241,17 @@ async function bundleInstall(platform, engine, version) {
|
||||
console.log(`Cache key: ${key}`)
|
||||
|
||||
// restore cache & install
|
||||
const cachedKey = await cache.restoreCache(paths, key, restoreKeys)
|
||||
let cachedKey = null
|
||||
try {
|
||||
cachedKey = await cache.restoreCache(paths, key, restoreKeys)
|
||||
} catch (error) {
|
||||
if (error.name === cache.ValidationError.name) {
|
||||
throw error;
|
||||
} else {
|
||||
core.info(`[warning] There was an error restoring the cache ${error.message}`)
|
||||
}
|
||||
}
|
||||
|
||||
if (cachedKey) {
|
||||
console.log(`Found cache for key: ${cachedKey}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user