Catch and report git errors (#353)

This commit is contained in:
David Boreham 2023-04-19 15:29:41 -06:00 committed by GitHub
parent 5ef37894ce
commit 7c867171e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,4 +175,8 @@ def command(ctx, include, exclude, git_ssh, check_only, pull, branches_file):
git_repo.git.checkout(branch_to_checkout)
for repo in repos:
try:
process_repo(repo)
except git.exc.GitCommandError as error:
print(f"\n******* git command returned error exit status:\n{error}")
sys.exit(1)