From db1edd85e6fb4707289baa3899537474b6f86315 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Wed, 19 Apr 2023 15:29:41 -0600 Subject: [PATCH] Catch and report git errors (#353) Former-commit-id: 7c867171e4dad0d841732b3b92a64061bd66c8cf --- app/setup_repositories.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/setup_repositories.py b/app/setup_repositories.py index 6f148b87..e8c08916 100644 --- a/app/setup_repositories.py +++ b/app/setup_repositories.py @@ -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: - process_repo(repo) + try: + process_repo(repo) + except git.exc.GitCommandError as error: + print(f"\n******* git command returned error exit status:\n{error}") + sys.exit(1)