pub fn run_command_capture(
command: &str,
env: &[(String, String)],
timeout: Duration,
) -> HookTestOutcomeExpand description
Run command once with env, capturing stdout/stderr and exit code,
killing it after timeout. Powers the Settings “Test” button. Like the
fire path, no shell is involved — pipes/redirects need an explicit
sh -c wrapper. The capture/spawn is the OS shim; the parsing
(parse_command) and output handling (truncate_output) are pure
and tested, and this whole function is exercised against real commands in
the unit tests.