(root: &Path, home: &Path, args: &[&str], extra_env: &[(&str, &str)])
| 71 | |
| 72 | #[cfg(feature = "adoption-test-injection")] |
| 73 | fn atomic_env(root: &Path, home: &Path, args: &[&str], extra_env: &[(&str, &str)]) -> Output { |
| 74 | let mut command = Command::new(ATOMIC_BIN); |
| 75 | command |
| 76 | .args(args) |
| 77 | .current_dir(root) |
| 78 | .env("HOME", home) |
| 79 | .env("ATOMIC_HOME", home.join(".atomic")); |
| 80 | if args.starts_with(&["git", "import"]) { |
| 81 | command.arg("--no-stream"); |
| 82 | } |
| 83 | for (key, value) in extra_env { |
| 84 | command.env(key, value); |
| 85 | } |
| 86 | command.output().expect("run atomic with env") |
| 87 | } |
| 88 | |
| 89 | fn atomic_text(output: &Output) -> String { |
| 90 | format!( |
no test coverage detected