Skip to main content

run_command

Function run_command 

Source
pub fn run_command(cmd: Command, description: &str) -> Result<(), BenchError>
Available on crate feature full only.
Expand description

Runs an external command with consistent error handling.

Captures both stdout and stderr on failure and formats them into an actionable error message.

§Arguments

  • cmd - The command to execute
  • description - Human-readable description of what the command does

§Returns

Ok(()) if the command succeeds, or a BenchError with detailed output on failure.