foundry_cli::utils

Trait CommandUtils

Source
pub trait CommandUtils {
    // Required methods
    fn exec(&mut self) -> Result<Output>;
    fn get_stdout_lossy(&mut self) -> Result<String>;
}
Expand description

Useful extensions to std::process::Command.

Required Methods§

Source

fn exec(&mut self) -> Result<Output>

Returns the command’s output if execution is successful, otherwise, throws an error.

Source

fn get_stdout_lossy(&mut self) -> Result<String>

Returns the command’s stdout if execution is successful, otherwise, throws an error.

Implementations on Foreign Types§

Source§

impl CommandUtils for Command

Source§

fn exec(&mut self) -> Result<Output>

Source§

fn get_stdout_lossy(&mut self) -> Result<String>

Implementors§