Resolve task through PATHEXT in the comment-lint hook

This commit is contained in:
Anthony Stirling
2026-08-28 13:54:28 +01:00
parent 5363e47714
commit fcc3c911fe
+3 -1
View File
@@ -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() {