From 19446b165a4c416b5192693193b9fe8da9c5f549 Mon Sep 17 00:00:00 2001 From: Sankalp Kotewar <98868223+kotewar@users.noreply.github.com> Date: Wed, 30 Nov 2022 10:47:09 +0000 Subject: [PATCH] Slight modification for test cases check --- dist/restore/index.js | 6 +++--- src/restore.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/restore/index.js b/dist/restore/index.js index b3a26fb..e4ee719 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -49015,14 +49015,14 @@ function run() { }); const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys); //Check if user wants to save cache despite of failure in any previous job - const saveCache = core.getBooleanInput(constants_1.Inputs.SaveOnAnyFailure); - if (saveCache == true) { + const saveCache = core.getInput(constants_1.Inputs.SaveOnAnyFailure).toLowerCase(); + if (saveCache == "true") { core.debug(`Exporting environment variable ${constants_1.Variables.SaveCacheOnAnyFailure}`); core.exportVariable(constants_1.Variables.SaveCacheOnAnyFailure, saveCache); core.info(`Input Variable ${constants_1.Variables.SaveCacheOnAnyFailure} is set to true, the cache will be saved despite of any failure in the build.`); } if (!cacheKey) { - if (core.getBooleanInput(constants_1.Inputs.FailOnCacheMiss) == true) { + if (core.getInput(constants_1.Inputs.FailOnCacheMiss).toLowerCase() == "true") { throw new Error(`Cache with the given input key ${primaryKey} is not found, hence exiting the workflow as the fail-on-cache-miss requirement is not met.`); } core.info(`Cache not found for input keys: ${[ diff --git a/src/restore.ts b/src/restore.ts index d80dfae..9eb6a0a 100644 --- a/src/restore.ts +++ b/src/restore.ts @@ -36,8 +36,8 @@ async function run(): Promise { ); //Check if user wants to save cache despite of failure in any previous job - const saveCache = core.getBooleanInput(Inputs.SaveOnAnyFailure); - if (saveCache == true) { + const saveCache = core.getInput(Inputs.SaveOnAnyFailure).toLowerCase(); + if (saveCache == "true") { core.debug( `Exporting environment variable ${Variables.SaveCacheOnAnyFailure}` ); @@ -48,7 +48,7 @@ async function run(): Promise { } if (!cacheKey) { - if (core.getBooleanInput(Inputs.FailOnCacheMiss) == true) { + if (core.getInput(Inputs.FailOnCacheMiss).toLowerCase() == "true") { throw new Error( `Cache with the given input key ${primaryKey} is not found, hence exiting the workflow as the fail-on-cache-miss requirement is not met.` );