Macro libcoreinst::runcmd_output[][src]

macro_rules! runcmd_output {
    ($cmd : expr) => { ... };
    ($cmd : expr, $($args : expr), *) => { ... };
}
Expand description

Runs the provided command, captures its stdout, and swallows its stderr except on failure. The first macro argument is the executable, and following arguments are passed to the command. 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.