mirror of
https://github.com/actions/cache.git
synced 2025-04-22 03:56:45 +00:00
Small improvements
This commit is contained in:
parent
a5631aba37
commit
64ae8e04f8
5 changed files with 10 additions and 15 deletions
|
@ -44,7 +44,7 @@ async function restoreImpl(
|
|||
);
|
||||
|
||||
if (!cacheKey) {
|
||||
if (core.getBooleanInput(Inputs.FailOnCacheMiss) == true) {
|
||||
if (core.getBooleanInput(Inputs.FailOnCacheMiss)) {
|
||||
throw new Error(
|
||||
`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`
|
||||
);
|
||||
|
@ -68,10 +68,7 @@ async function restoreImpl(
|
|||
);
|
||||
|
||||
core.setOutput(Outputs.CacheHit, isExactKeyMatch.toString());
|
||||
if (
|
||||
!isExactKeyMatch &&
|
||||
core.getBooleanInput(Inputs.FailOnCacheMiss) == true
|
||||
) {
|
||||
if (!isExactKeyMatch && core.getBooleanInput(Inputs.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