Skip to main content

execute_command

Function execute_command 

Source
pub async fn execute_command(
    executable_path: impl Into<PathBuf>,
    args: &[String],
    timeout: Duration,
) -> Result<ProcessOutput>
Expand description

Executes a command with the given arguments and timeout.

§Arguments

  • executable_path - Path to the executable
  • args - Arguments to pass to the command
  • timeout - Maximum duration to wait for the process

§Errors

Returns an error if the command fails, times out, or cannot be executed