pub fn to_res() -> fn(cmd: &mut Command) -> Result<i32, i32>
Generate a closure that returns a Result with the exit code of the process.
Ok(0)
Err(x)