Skip to main content

apply_to_child

Function apply_to_child 

Source
pub fn apply_to_child(cmd: &mut Command, piped: bool)
Expand description

Make a child process (a wrangler) whose output reaches the user colour as we do: under never, NO_COLOR set and FORCE_COLOR taken away; under always, the reverse. Under auto the child decides for itself, unless its output is piped through us, where it can no longer see our terminal: then FORCE_COLOR when we would colour stderr.