From b3c7aa7372bb8c2a98069821038d3ed34bd4d90f Mon Sep 17 00:00:00 2001 From: Mario Campos Date: Fri, 19 Jun 2026 18:04:52 -0500 Subject: [PATCH] Add warning log for invalid data in command cache retrieval --- lib/entry-points.js | 1 + src/cache.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/entry-points.js b/lib/entry-points.js index aff18c1a4..348e213bd 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -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); diff --git a/src/cache.ts b/src/cache.ts index df8b69d8b..7ec0d6851 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -121,6 +121,7 @@ export function getCachedCommandOutput( (cmd !== undefined && entry.cmd !== cmd) || (validate !== undefined && !validate(entry.output)) ) { + logger.warning("Received invalid data from the command-cache file."); return undefined; }