Skip to content

Commit ec2dad7

Browse files
authored
Rollup merge of #140394 - Kobzol:git-test-self-contained, r=jieyouxu
Make bootstrap git tests more self-contained Based on https://stackoverflow.com/a/67512433/1107768. Fixes: #140387 r? ```@jieyouxu```
2 parents fd95953 + 8fa5e3a commit ec2dad7

File tree

1 file changed

+3
-0
lines changed
  • src/bootstrap/src/utils/tests

1 file changed

+3
-0
lines changed

src/bootstrap/src/utils/tests/git.rs

+3
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ impl GitCtx {
129129

130130
fn git_cmd(&self) -> Command {
131131
let mut cmd = Command::new("git");
132+
cmd.env("GIT_CONFIG_NOSYSTEM", "1");
133+
cmd.env("GIT_CONFIG_SYSTEM", "/tmp/nonexistent");
134+
cmd.env("GIT_CONFIG_GLOBAL", "/tmp/nonexistent");
132135
cmd.current_dir(&self.dir);
133136
cmd
134137
}

0 commit comments

Comments
 (0)