mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-09 15:02:30 +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:
parent
40927950c4
commit
ed38744605
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue