perf(main): short-circuit runtime command matching

This commit is contained in:
777genius 2026-05-31 11:18:03 +03:00
parent c85b0d94ce
commit 47cea728b0

View file

@ -168,6 +168,7 @@ export function commandArgEquals(
const normalizedExpected = expected?.trim();
if (!normalizedExpected) return false;
if (!command.includes(argName)) return false;
if (!command.includes(normalizedExpected)) return false;
const cached = getCachedCliArgEquals(command, argName, normalizedExpected);
if (cached !== undefined) {
return cached;