Expand description
Small subprocess runner.
Wraps std::process::Command with:
- A
timeoutguard that SIGTERMs then SIGKILLs on overrun. - Preserved stderr so
crate::Error::CommandFailedcan surface the underlying tool’s own diagnostics. CommandRunnertrait 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
RunOptionsand returnsRunResult. - 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 orError::MissingDependency.