diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2025-09-16 21:51:39 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2025-09-16 21:53:42 +0200 |
| commit | b79a4bfad66dea3a8b6bc90985cb65378288fe07 (patch) | |
| tree | 3662abcd8222538c4cb26fb1b8058a9ac3399bf1 /src/bootstrap/bootstrap.py | |
| parent | eec6bd9d69832f57341c6de6a93fa7b9f47e2111 (diff) | |
| download | rust-b79a4bfad66dea3a8b6bc90985cb65378288fe07.tar.gz rust-b79a4bfad66dea3a8b6bc90985cb65378288fe07.zip | |
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.
Diffstat (limited to 'src/bootstrap/bootstrap.py')
| -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>" |
