| 123 | } |
| 124 | |
| 125 | fn git(&self, args: &[&str]) -> Output { |
| 126 | let mut command = Command::new("git"); |
| 127 | command |
| 128 | .args(args) |
| 129 | .current_dir(self.root()) |
| 130 | .env("HOME", self.home.path()) |
| 131 | .env("GIT_CONFIG_NOSYSTEM", "1") |
| 132 | .env("GIT_AUTHOR_NAME", "Record Cleanup Tests") |
| 133 | .env("GIT_AUTHOR_EMAIL", "cleanup@example.com") |
| 134 | .env("GIT_COMMITTER_NAME", "Record Cleanup Tests") |
| 135 | .env("GIT_COMMITTER_EMAIL", "cleanup@example.com") |
| 136 | .stdout(Stdio::piped()) |
| 137 | .stderr(Stdio::piped()); |
| 138 | command.output().expect("run git") |
| 139 | } |
| 140 | |
| 141 | fn git_ok(&self, args: &[&str]) -> Output { |
| 142 | let output = self.git(args); |