diff options
| author | Chris Denton <chris@chrisdenton.dev> | 2025-04-28 23:29:18 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-28 23:29:18 +0000 |
| commit | ec2dad74a8ddc8117356faa48c4fea12dac1dd5c (patch) | |
| tree | e1e54b4d163726e97a42ba7dc51d38b3c2ed3f85 | |
| parent | fd95953d9c561775b2378315561a6adb9dd8a588 (diff) | |
| parent | 8fa5e3a5718fedfe4faac71179b0c78cce3c9393 (diff) | |
| download | rust-ec2dad74a8ddc8117356faa48c4fea12dac1dd5c.tar.gz rust-ec2dad74a8ddc8117356faa48c4fea12dac1dd5c.zip | |
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: https://github.com/rust-lang/rust/issues/140387 r? ```@jieyouxu```
| -rw-r--r-- | src/bootstrap/src/utils/tests/git.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bootstrap/src/utils/tests/git.rs b/src/bootstrap/src/utils/tests/git.rs index bd40f398c7b..d9dd9ab9800 100644 --- a/src/bootstrap/src/utils/tests/git.rs +++ b/src/bootstrap/src/utils/tests/git.rs @@ -129,6 +129,9 @@ impl GitCtx { fn git_cmd(&self) -> Command { let mut cmd = Command::new("git"); + cmd.env("GIT_CONFIG_NOSYSTEM", "1"); + cmd.env("GIT_CONFIG_SYSTEM", "/tmp/nonexistent"); + cmd.env("GIT_CONFIG_GLOBAL", "/tmp/nonexistent"); cmd.current_dir(&self.dir); cmd } |
