(root: &Path, home: &Path, args: &[&str])
| 28 | const ATOMIC_BIN: &str = env!("CARGO_BIN_EXE_atomic"); |
| 29 | |
| 30 | fn atomic(root: &Path, home: &Path, args: &[&str]) -> Output { |
| 31 | Command::new(ATOMIC_BIN) |
| 32 | .args(args) |
| 33 | .current_dir(root) |
| 34 | .env("HOME", home) |
| 35 | .env("ATOMIC_HOME", home.join(".atomic")) |
| 36 | .output() |
| 37 | .expect("run atomic") |
| 38 | } |
| 39 | |
| 40 | fn atomic_ok(root: &Path, home: &Path, args: &[&str]) -> String { |
| 41 | let output = atomic(root, home, args); |