abstutil/
process.rs

1use std::process::Command;
2
3/// Runs a command, asserts success. STDOUT and STDERR aren't touched.
4pub fn must_run_cmd(cmd: &mut Command) {
5    println!("- Running {:?}", cmd);
6    match cmd.status() {
7        Ok(status) => {
8            if !status.success() {
9                panic!("{:?} failed", cmd);
10            }
11        }
12        Err(err) => {
13            panic!("Failed to run {:?}: {:?}", cmd, err);
14        }
15    }
16}