From 12086c7bbf3775868031fcf4beeb1a0787a4fd21 Mon Sep 17 00:00:00 2001 From: Deepak Dahiya <59823596+t-dedah@users.noreply.github.com> Date: Wed, 4 May 2022 13:43:52 +0000 Subject: [PATCH] new build --- dist/restore/index.js | 5 +++-- dist/save/index.js | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dist/restore/index.js b/dist/restore/index.js index 948cd51..50897b8 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -48245,11 +48245,12 @@ function run() { core.info(`Cache restored from key: ${cacheKey}`); } catch (error) { - if (error.name === cache.ValidationError.name) { + const typedError = error; + if (typedError.name === cache.ValidationError.name) { throw error; } else { - utils.logWarning(error.message); + utils.logWarning(typedError.message); utils.setCacheHitOutput(false); } } diff --git a/dist/save/index.js b/dist/save/index.js index 824e0d5..a3b423c 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -46645,14 +46645,15 @@ function run() { core.info(`Cache saved with key: ${primaryKey}`); } catch (error) { - if (error.name === cache.ValidationError.name) { + const typedError = error; + if (typedError.name === cache.ValidationError.name) { throw error; } - else if (error.name === cache.ReserveCacheError.name) { - core.info(error.message); + else if (typedError.name === cache.ReserveCacheError.name) { + core.info(typedError.message); } else { - utils.logWarning(error.message); + utils.logWarning(typedError.message); } } }