Function stream_output

Source
pub fn stream_output(child: Child) -> ExitCode
Expand description

Stream the output of a child process to stdout and stderr, coloring any lines from stderr red.

The function takes a mutable reference to a Child process and returns an ExitCode indicating the exit status of the process.

The function will block until the child process has finished executing.

ยงErrors

If there is an error waiting for the child process to finish, an error message will be printed to stderr and the process will exit with a status code of 1.