nonzero_captured

Function nonzero_captured 

Source
pub fn nonzero_captured(
    name: String,
    output: impl Into<Output>,
) -> Result<NamedOutput, CmdError>
Expand description

Converts an Output into an error when status is non-zero

Use when the Output comes from a source that was not streamed to stdout/stderr so it will be included in the error display by default.

To avoid double printing stdout/stderr when streaming use nonzero_streamed

ยงErrors

Returns Err when the Output status is non-zero