pub async fn output_string<I, S>(
program: impl AsRef<OsStr>,
args: I,
) -> Result<ProcessResult<String>>Expand description
Run program with args inside a private job and capture the result
without erroring on a non-zero exit — for commands whose exit code is meaningful.
§Errors
The same surface as Command::output_string: a non-zero exit, a timeout,
and a signal-kill are captured in the returned ProcessResult, not
raised; beyond a launch failure, only ErrorReason::Cancelled,
ErrorReason::OutputTooLarge, ErrorReason::Stdin, and ErrorReason::Io surface.