Compare commits

..

No commits in common. "8addae5ffffa871c88fbd2d8a9a43af45f069161" and "688d5d46889fab7d248142e89a05397103e09377" have entirely different histories.

4 changed files with 4 additions and 4 deletions

View File

@ -260,7 +260,7 @@ test("Fail restore when fail on cache miss is enabled and primary + restore keys
);
expect(stateMock).toHaveBeenCalledWith("CACHE_KEY", key);
expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1);
expect(setCacheHitOutputMock).toHaveBeenCalledTimes(0);
expect(failedMock).toHaveBeenCalledWith(
`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${key}`

View File

@ -59415,7 +59415,6 @@ function restoreImpl(stateProvider, earlyExit) {
const lookupOnly = utils.getInputAsBool(constants_1.Inputs.LookupOnly);
const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys, { lookupOnly: lookupOnly }, enableCrossOsArchive);
if (!cacheKey) {
core.setOutput(constants_1.Outputs.CacheHit, false.toString());
if (failOnCacheMiss) {
throw new Error(`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`);
}
@ -59423,6 +59422,7 @@ function restoreImpl(stateProvider, earlyExit) {
primaryKey,
...restoreKeys
].join(", ")}`);
core.setOutput(constants_1.Outputs.CacheHit, false.toString());
return;
}
// Store the matched cache key in states

View File

@ -59415,7 +59415,6 @@ function restoreImpl(stateProvider, earlyExit) {
const lookupOnly = utils.getInputAsBool(constants_1.Inputs.LookupOnly);
const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys, { lookupOnly: lookupOnly }, enableCrossOsArchive);
if (!cacheKey) {
core.setOutput(constants_1.Outputs.CacheHit, false.toString());
if (failOnCacheMiss) {
throw new Error(`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`);
}
@ -59423,6 +59422,7 @@ function restoreImpl(stateProvider, earlyExit) {
primaryKey,
...restoreKeys
].join(", ")}`);
core.setOutput(constants_1.Outputs.CacheHit, false.toString());
return;
}
// Store the matched cache key in states

View File

@ -51,7 +51,6 @@ export async function restoreImpl(
);
if (!cacheKey) {
core.setOutput(Outputs.CacheHit, false.toString());
if (failOnCacheMiss) {
throw new Error(
`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`
@ -63,6 +62,7 @@ export async function restoreImpl(
...restoreKeys
].join(", ")}`
);
core.setOutput(Outputs.CacheHit, false.toString());
return;
}