fix(hooks): require successful shell probe in observe runner (#2403)

Require observe-runner shell detection to accept only candidates whose probe exits successfully, avoiding Windows WSL launcher false positives.
This commit is contained in:
JongHyeok Park
2026-07-13 21:31:12 -04:00
committed by GitHub
parent 40927950c4
commit ed38744605
+4 -1
View File
@@ -61,7 +61,10 @@ function findShellBinary() {
stdio: 'ignore', stdio: 'ignore',
windowsHide: true windowsHide: true
}); });
if (!probe.error) { // Require the probe to actually succeed, not just spawn: Windows'
// System32\bash.exe (WSL launcher) spawns even with no distro installed but
// exits non-zero, so `!probe.error` alone would treat it as a usable shell.
if (!probe.error && probe.status === 0) {
return candidate; return candidate;
} }
} }