Skip to main content

cmd_output

Function cmd_output 

Source
pub fn cmd_output(cmd: &mut Command) -> Result<String>
Expand description

Runs the provided Command object, captures its stdout, and swallows its stderr except on failure. Returns a Result describing whether the command failed, and if not, its standard output. Output is assumed to be UTF-8. Errors are adequately prefixed with the full command.