Skip to content

Commit

Permalink
Catch stderr from subprocesses
Browse files Browse the repository at this point in the history
  • Loading branch information
elibon99 committed Jun 20, 2024
1 parent 330b62b commit 6d93e22
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gitbark/cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

import click
import logging
import subprocess
import sys
import os

Expand Down Expand Up @@ -327,6 +328,9 @@ def main():
if isinstance(e, CliFail):
status = e.status
msg = e.args[0]
elif isinstance(e, subprocess.CalledProcessError):
status = e.returncode
msg = e.stderr.strip()
else:
msg = "An unexpected error occured."
formatter.show_trace = True
Expand Down

0 comments on commit 6d93e22

Please sign in to comment.