From ff0ce328400a2f5883d7c664f7ab2a6aa0b749d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Sormage=C3=A7?= Date: Wed, 11 Feb 2026 23:28:41 -0500 Subject: [PATCH] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/agents/skills/config.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/agents/skills/config.ts b/src/agents/skills/config.ts index 391f36f3e8..0c5679c593 100644 --- a/src/agents/skills/config.ts +++ b/src/agents/skills/config.ts @@ -99,7 +99,12 @@ export function isBundledSkillAllowed(entry: SkillEntry, allowlist?: string[]): export function hasBinary(bin: string): boolean { const pathEnv = process.env.PATH ?? ""; const parts = pathEnv.split(path.delimiter).filter(Boolean); - const extensions = process.platform === "win32" ? [".exe", ".cmd", ".bat", ""] : [""]; + const winPathExt = process.env.PATHEXT; + const winExtensions = + winPathExt !== undefined + ? winPathExt.split(";").filter(Boolean) + : [".EXE", ".CMD", ".BAT", ".COM"]; + const extensions = process.platform === "win32" ? ["", ...winExtensions] : [""]; for (const part of parts) { for (const ext of extensions) { const candidate = path.join(part, bin + ext);