From ddcafbea28ef69da0afed2e7ace5c132c19774e5 Mon Sep 17 00:00:00 2001 From: rak Date: Tue, 18 Mar 2025 23:14:54 +0100 Subject: [PATCH] Fix cache-hit state boolean cast --- dist/cleanup/index.js | 2 +- dist/setup/index.js | 2 +- src/cache.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index 9354d03b..8c925386 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -96670,7 +96670,7 @@ function save(id) { core.warning('Error retrieving key from state.'); return; } - if (!!cacheHit || cacheHit !== 'false') { + if (cacheHit === 'true') { // no change in target directories core.info(`${cacheHit}: Cache hit occurred on the primary key ${primaryKey}, not saving cache.`); return; diff --git a/dist/setup/index.js b/dist/setup/index.js index bd76ac42..58400422 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -131919,7 +131919,7 @@ function save(id) { core.warning('Error retrieving key from state.'); return; } - if (!!cacheHit || cacheHit !== 'false') { + if (cacheHit === 'true') { // no change in target directories core.info(`${cacheHit}: Cache hit occurred on the primary key ${primaryKey}, not saving cache.`); return; diff --git a/src/cache.ts b/src/cache.ts index 48cc2400..70ecc9d0 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -146,7 +146,7 @@ export async function save(id: string) { core.warning('Error retrieving key from state.'); return; } - if (!!cacheHit || cacheHit !== 'false') { + if (cacheHit === 'true') { // no change in target directories core.info( `${cacheHit}: Cache hit occurred on the primary key ${primaryKey}, not saving cache.`