diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 19e87f9c29317..effd33d288fa6 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -1193,8 +1193,6 @@ def get_latest_commit(self): return "" cmd = [ "git", - "-C", - repo_path, "rev-list", "--author", author_email, @@ -1202,7 +1200,9 @@ def get_latest_commit(self): "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 "" except subprocess.CalledProcessError: return ""