From 3928922731baba2fe05621fdd7f8345f63f70d15 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 29 Jan 2020 16:39:31 -0800 Subject: [PATCH] Display git subprocess errors upon exception. --- gitcheckup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gitcheckup.py b/gitcheckup.py index 1ffab1f..edf8e9d 100644 --- a/gitcheckup.py +++ b/gitcheckup.py @@ -108,7 +108,11 @@ def gitcheckup(do_fetch=False): return 1 for directory in directories: - result = checkup(directory, do_fetch=do_fetch) + try: + result = checkup(directory, do_fetch=do_fetch) + except subprocess.CalledProcessError as exc: + raise Exception(exc.output) + committed = 'C' if result.committed else ' ' pushed = 'P' if result.pushed else ' '