Skip to main content

Module runner

Module runner 

Source
Expand description

Small subprocess runner.

Wraps std::process::Command with:

  • A timeout guard that SIGTERMs then SIGKILLs on overrun.
  • Preserved stderr so crate::Error::CommandFailed can surface the underlying tool’s own diagnostics.
  • CommandRunner trait so tests can inject a fake binary (see #[cfg(test)] in each module).

Structs§

RunOptions
Configuration for a single subprocess.
RunResult
Output of a completed subprocess.

Constants§

TIMEOUT_STATUS
Status reported for a subprocess that was killed by its timeout. Exposed so callers and tests can branch on it without magic numbers.

Functions§

read_line_interactive
Read stdin from an interactive TTY, returning a trimmed line.
run
Runs a command with RunOptions and returns RunResult.
run_expect_success
Convenience helper: run a command that should succeed, otherwise wrap into Error::CommandFailed.
which
Locate a binary on PATH. Returns the full path or Error::MissingDependency.