Skip to content

Commit

Permalink
fix: output errors (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr authored Oct 29, 2024
1 parent d272309 commit 9be73aa
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions admin_migrations/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,16 @@ def pushd(new_dir):


def _run_git_command(args, check=True):
s = subprocess.run(
["git"] + args,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
check=check,
)
try:
s = subprocess.run(
["git"] + args,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
check=check,
)
except subprocess.CalledProcessError as e:
print(f" ERROR: {s.stdout.decode('utf-8')}", flush=True)
raise e
if s.returncode != 0:
print(f" ERROR: {s.stdout.decode('utf-8')}", flush=True)
return s.returncode == 0, s.stdout.decode("utf-8")
Expand Down

0 comments on commit 9be73aa

Please sign in to comment.