Fix cache-hit state boolean cast

This commit is contained in:
rak
2025-03-18 22:41:09 +01:00
parent 5a1d04e5f3
commit 78f53588f3
3 changed files with 6 additions and 3 deletions

View File

@@ -96664,7 +96664,8 @@ function save(id) {
const packageManager = findPackageManager(id);
// Inputs are re-evaluated before the post action, so we want the original key used for restore
const primaryKey = core.getState(STATE_CACHE_PRIMARY_KEY);
const cacheHit = core.getState(STATE_CACHE_HIT);
const cacheHitString = core.getState(STATE_CACHE_HIT);
const cacheHit = Boolean(cacheHitString);
if (!primaryKey) {
core.warning('Error retrieving key from state.');
return;

3
dist/setup/index.js vendored
View File

@@ -131913,7 +131913,8 @@ function save(id) {
const packageManager = findPackageManager(id);
// Inputs are re-evaluated before the post action, so we want the original key used for restore
const primaryKey = core.getState(STATE_CACHE_PRIMARY_KEY);
const cacheHit = core.getState(STATE_CACHE_HIT);
const cacheHitString = core.getState(STATE_CACHE_HIT);
const cacheHit = Boolean(cacheHitString);
if (!primaryKey) {
core.warning('Error retrieving key from state.');
return;

View File

@@ -136,7 +136,8 @@ export async function save(id: string) {
// Inputs are re-evaluated before the post action, so we want the original key used for restore
const primaryKey = core.getState(STATE_CACHE_PRIMARY_KEY);
const cacheHit = core.getState(STATE_CACHE_HIT);
const cacheHitString = core.getState(STATE_CACHE_HIT);
const cacheHit = Boolean(cacheHitString);
if (!primaryKey) {
core.warning('Error retrieving key from state.');