CreateProcess resolves a bare "bash" to System32 WSL launcher before PATH,
and shutil.which("bash") inherits PATH order (#115124), so node bootstrap,
the TUI node probe and webhook filter scripts ran the wrong interpreter on
Windows. All four sites now use tools.environments.local._find_bash (Git Bash
first, probed). rc!=0 with no output at all is now a WARNING in webhook
filters and an explicit [inline-shell exit N with no output] marker in skills.
Co-authored-by: funky-xamarin <30426178+Wenfengcheng@users.noreply.github.com>
12 lines
547 B
Python
12 lines
547 B
Python
"""Inline-shell snippets never turn a silent failure into an empty (looks-fine) result."""
|
|
from agent.skill_preprocessing import run_inline_shell
|
|
|
|
|
|
def test_silent_nonzero_exit_returns_marker(tmp_path):
|
|
"""rc!=0 with no stdout and no stderr is the interpreter-never-ran signature (#116818)."""
|
|
assert run_inline_shell("exit 3", tmp_path, 5) == "[inline-shell exit 3 with no output: exit 3]"
|
|
|
|
|
|
def test_nonzero_exit_with_stderr_keeps_the_diagnostic(tmp_path):
|
|
assert run_inline_shell('printf "diag" >&2; exit 3', tmp_path, 5) == "diag"
|