Skip to main content

run_external_tool_capture

Function run_external_tool_capture 

Source
pub fn run_external_tool_capture(
    command: &str,
    args: &[&str],
    working_dir: Option<&Path>,
    timeout_secs: u32,
) -> Result<ExternalToolResult, FormatError>
Expand description

Spawn a subprocess and capture output regardless of exit code.

Unlike run_external_tool, this does NOT treat non-zero exit as an error — type checkers return non-zero when they find issues, which is expected. Returns FormatError::NotFound when the binary isn’t on PATH, and FormatError::Timeout if the deadline is exceeded.