mirror of
https://github.com/github/codeql-action.git
synced 2026-10-30 09:37:15 +00:00
Add warning log for invalid data in command cache retrieval
This commit is contained in:
1
lib/entry-points.js
generated
1
lib/entry-points.js
generated
@@ -149955,6 +149955,7 @@ function getCachedCommandOutput(key, cmd, validate) {
|
||||
}
|
||||
const entry = readCommandCacheFile()[key];
|
||||
if (!isObject(entry) || !isString(entry.cmd) || cmd !== void 0 && entry.cmd !== cmd || validate !== void 0 && !validate(entry.output)) {
|
||||
logger.warning("Received invalid data from the command-cache file.");
|
||||
return void 0;
|
||||
}
|
||||
cacheCommandOutput(key, entry.cmd, entry.output);
|
||||
|
||||
@@ -121,6 +121,7 @@ export function getCachedCommandOutput<T>(
|
||||
(cmd !== undefined && entry.cmd !== cmd) ||
|
||||
(validate !== undefined && !validate(entry.output))
|
||||
) {
|
||||
logger.warning("Received invalid data from the command-cache file.");
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user