Skip to main content

run_external_tool

Function run_external_tool 

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

Spawn a subprocess and wait for completion with timeout protection.

Polls try_wait() at 50ms intervals. On timeout, kills the child process and waits for it to exit. Returns FormatError::NotFound when the binary isn’t on PATH.