Skip to content

Commit b758cf1

Browse files
committed
9pm.py: improve verbose git command output
Make CI integration easier by printing more info with -v. Signed-off-by: Richard Alpe <[email protected]>
1 parent a3b5362 commit b758cf1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

9pm.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,14 +673,17 @@ def run_git_cmd(path, command):
673673
return ""
674674

675675
try:
676+
vcprint(pcolor.faint, f"Running: git -C {path} {command}")
676677
result = subprocess.check_output(
677678
['git', '-C', path] + command,
678679
stderr=subprocess.STDOUT
679680
).decode('utf-8').strip()
680-
return result
681-
except (FileNotFoundError, subprocess.CalledProcessError):
681+
except Exception as e:
682+
cprint(pcolor.orange, f"warning, git command failed ({e})")
682683
return ""
683684

685+
return result
686+
684687
def pr_proj_info(proj):
685688
str = f"\nTesting"
686689

0 commit comments

Comments
 (0)