mirror of https://github.com/actions/cache.git
Updated error message
This commit is contained in:
parent
164ae74f71
commit
e39391011c
|
@ -48997,7 +48997,7 @@ function run() {
|
||||||
const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey);
|
const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey);
|
||||||
utils.setCacheHitOutput(isExactKeyMatch);
|
utils.setCacheHitOutput(isExactKeyMatch);
|
||||||
if (!isExactKeyMatch && core.getInput(constants_1.Inputs.StrictRestore) == "true") {
|
if (!isExactKeyMatch && core.getInput(constants_1.Inputs.StrictRestore) == "true") {
|
||||||
throw new Error("Cache with exact key not found, hence exiting the workflow as strict-restore is set to true");
|
throw new Error("Restored cache doesn't match the key in the input, hence exiting the workflow as strict-restore requirement is not met.");
|
||||||
}
|
}
|
||||||
core.info(`Cache restored from key: ${cacheKey}`);
|
core.info(`Cache restored from key: ${cacheKey}`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ async function run(): Promise<void> {
|
||||||
|
|
||||||
if (!isExactKeyMatch && core.getInput(Inputs.StrictRestore) == "true") {
|
if (!isExactKeyMatch && core.getInput(Inputs.StrictRestore) == "true") {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"Cache with exact key not found, hence exiting the workflow as strict-restore is set to true"
|
"Restored cache doesn't match the key in the input, hence exiting the workflow as strict-restore requirement is not met."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
core.info(`Cache restored from key: ${cacheKey}`);
|
core.info(`Cache restored from key: ${cacheKey}`);
|
||||||
|
|
Loading…
Reference in New Issue