fix(exec): satisfy allowlist predicate type checks

This commit is contained in:
luoyanglang
2026-04-03 00:22:34 +08:00
committed by Peter Steinberger
parent 7c83cae425
commit 68d8e15a2e

View File

@@ -698,7 +698,10 @@ function hasSegmentExecutableMatch(
const execution = resolveExecutionTargetResolution(segment.resolution);
const candidates = [execution?.executableName, execution?.rawExecutable, segment.argv[0]];
for (const candidate of candidates) {
const trimmed = candidate?.trim();
if (typeof candidate !== "string") {
continue;
}
const trimmed = candidate.trim();
if (!trimmed) {
continue;
}