fn write_output(writer: impl Write, text: &str) -> Result<()>
Write the output of a command. A reader which is gone, like head, ends the output without an error, println! would panic and abort.
head
println!