diff --git a/dist/index.js b/dist/index.js index 0839809..0138e93 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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}`) } diff --git a/index.js b/index.js index 4fbaa81..83e9d11 100644 --- a/index.js +++ b/index.js @@ -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}`) }