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.
This commit is contained in:
parent
eec6bd9d69
commit
b79a4bfad6
1 changed files with 3 additions and 3 deletions
|
|
@ -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>"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue