From ed387446052dfbc6b52de149406b70efa65edc59 Mon Sep 17 00:00:00 2001 From: JongHyeok Park Date: Tue, 14 Jul 2026 10:31:12 +0900 Subject: [PATCH] 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. --- scripts/hooks/observe-runner.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/hooks/observe-runner.js b/scripts/hooks/observe-runner.js index 28e7f4fb0..c046d75f0 100644 --- a/scripts/hooks/observe-runner.js +++ b/scripts/hooks/observe-runner.js @@ -61,7 +61,10 @@ function findShellBinary() { stdio: 'ignore', 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; } }