1
0
Fork 0
mirror of https://github.com/actions/cache.git synced 2025-07-09 08:52:54 +00:00

Restore original behavior of cache-hit output

This commit is contained in:
Josh Gross 2024-10-08 12:55:55 -04:00
parent 2cdf405574
commit dacbcb8908
No known key found for this signature in database
7 changed files with 15 additions and 9 deletions

View file

@ -51,7 +51,9 @@ export async function restoreImpl(
);
if (!cacheKey) {
core.setOutput(Outputs.CacheHit, false.toString());
// `cache-hit` is intentionally not set to `false` here to preserve existing behavior
// See https://github.com/actions/cache/issues/1466
if (failOnCacheMiss) {
throw new Error(
`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`