diff --git a/scripts/lint/comment-lint-hook.mjs b/scripts/lint/comment-lint-hook.mjs index af573c6a91..19bf52023c 100644 --- a/scripts/lint/comment-lint-hook.mjs +++ b/scripts/lint/comment-lint-hook.mjs @@ -92,7 +92,9 @@ function taskCommand() { for (const candidate of candidates) { if (existsSync(candidate)) return { command: candidate, shell: false }; } - return { command: process.platform === "win32" ? "task.cmd" : "task", shell: process.platform === "win32" }; + // "task" rather than "task.cmd": only an npm install ships a .cmd, and scoop or + // winget put task.exe on PATH, which the shell resolves through PATHEXT anyway. + return { command: "task", shell: process.platform === "win32" }; } function run() {