Remove duplicate key check in cacheCommandOutput and related tests

This key-check is unnecessary because this function is only ever called if the key does NOT exist in the cache already. In that case, why check again?
This commit is contained in:
Mario Campos
2026-06-19 16:29:52 -05:00
parent d1bd5ec7b0
commit 805b59092e
3 changed files with 0 additions and 30 deletions

5
lib/entry-points.js generated
View File

@@ -149942,11 +149942,6 @@ function writeCommandCacheFile(data) {
}
}
function cacheCommandOutput(key, cmd, output) {
if (inMemoryCache.has(key)) {
throw new Error(
`cacheCommandOutput() should be called only once per key, but was called more than once for '${key}'.`
);
}
const entry = { cmd, output };
inMemoryCache.set(key, entry);
const data = readCommandCacheFile();