diff options
| author | Jana Dönszelmann <jonathan@donsz.nl> | 2025-09-17 20:29:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-17 20:29:38 +0200 |
| commit | b8a80e4f79498f0ef7e4aff03d9706b9126899a3 (patch) | |
| tree | 918979c59e970206c35d18b2ddfbc99bd9fb5322 /src | |
| parent | be8c29ccf272fc3a475f93de1de70e25183a7380 (diff) | |
| parent | b79a4bfad66dea3a8b6bc90985cb65378288fe07 (diff) | |
| download | rust-b8a80e4f79498f0ef7e4aff03d9706b9126899a3.tar.gz rust-b8a80e4f79498f0ef7e4aff03d9706b9126899a3.zip | |
Rollup merge of #146654 - samueltardieu:issue142534, r=Kobzol
Do not use `git -C dir` Older versions of git (≤ 1.8.5) do not support the `-C dir` global option. Use the `cwd` optional argument when using Python's `subprocess` functionality instead. Fix rust-lang/rust#142534
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 19e87f9c293..effd33d288f 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -1193,8 +1193,6 @@ class RustBuild(object): return "<commit>" cmd = [ "git", - "-C", - repo_path, "rev-list", "--author", author_email, @@ -1202,7 +1200,9 @@ class RustBuild(object): "HEAD", ] try: - commit = subprocess.check_output(cmd, universal_newlines=True).strip() + commit = subprocess.check_output( + cmd, universal_newlines=True, cwd=repo_path + ).strip() return commit or "<commit>" except subprocess.CalledProcessError: return "<commit>" |
