Skip to content

Commit 9a5d014

Browse files
fix: Do not ignore stderr in case there is a problem in a git call. (#416)
Previously Griffe was only printing the output of stdout in case there was a problem in a git call. This commit implements printing the stderr along with stdout. Issue-415: #415 PR-416: #416
1 parent 1dd55f6 commit 9a5d014

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/griffe/_internal/git.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _normalize(value: str) -> str:
3434

3535

3636
def _git(*args: str, check: bool = True) -> str:
37-
process = subprocess.run(["git", *args], check=False, text=True, capture_output=True)
37+
process = subprocess.run(["git", *args], check=False, text=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
3838
if check and process.returncode != 0:
3939
raise GitError(process.stdout.strip())
4040
return process.stdout.strip()

0 commit comments

Comments
 (0)