mirror of
https://github.com/actions/cache.git
synced 2025-07-12 09:10:44 +00:00
Changes after rebase
This commit is contained in:
parent
64ae8e04f8
commit
ec9f13e3be
7 changed files with 34 additions and 20 deletions
|
@ -34,6 +34,7 @@ async function restoreImpl(
|
|||
const enableCrossOsArchive = utils.getInputAsBool(
|
||||
Inputs.EnableCrossOsArchive
|
||||
);
|
||||
const failOnCacheMiss = utils.getInputAsBool(Inputs.FailOnCacheMiss);
|
||||
|
||||
const cacheKey = await cache.restoreCache(
|
||||
cachePaths,
|
||||
|
@ -44,7 +45,7 @@ async function restoreImpl(
|
|||
);
|
||||
|
||||
if (!cacheKey) {
|
||||
if (core.getBooleanInput(Inputs.FailOnCacheMiss)) {
|
||||
if (failOnCacheMiss) {
|
||||
throw new Error(
|
||||
`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`
|
||||
);
|
||||
|
@ -68,7 +69,7 @@ async function restoreImpl(
|
|||
);
|
||||
|
||||
core.setOutput(Outputs.CacheHit, isExactKeyMatch.toString());
|
||||
if (!isExactKeyMatch && core.getBooleanInput(Inputs.FailOnCacheMiss)) {
|
||||
if (!isExactKeyMatch && failOnCacheMiss) {
|
||||
throw new Error(
|
||||
`Restored cache key doesn't match the given input key. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue