| 38 | } |
| 39 | |
| 40 | fn command(&self, program: &str) -> Command { |
| 41 | let mut command = Command::new(program); |
| 42 | command |
| 43 | .current_dir(self.dir()) |
| 44 | .env("HOME", self.home.path()) |
| 45 | .env("ATOMIC_CONFIG_DIR", self.home.path().join(".atomic")) |
| 46 | .env("GIT_CONFIG_NOSYSTEM", "1") |
| 47 | .env("GIT_AUTHOR_NAME", "Shim Logging") |
| 48 | .env("GIT_AUTHOR_EMAIL", "shim@example.com") |
| 49 | .env("GIT_COMMITTER_NAME", "Shim Logging") |
| 50 | .env("GIT_COMMITTER_EMAIL", "shim@example.com") |
| 51 | .env_remove("ATOMIC_LOG") |
| 52 | .env_remove("ATOMIC_LOG_DIR") |
| 53 | .env_remove("RUST_LOG"); |
| 54 | command |
| 55 | } |
| 56 | |
| 57 | fn atomic(&self, args: &[&str]) -> Output { |
| 58 | self.command(ATOMIC_BIN) |