mirror of
https://github.com/affaan-m/ECC.git
synced 2026-08-17 21:15:40 +02:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user