mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 14:30:09 +01:00
Fix: Expose error messages of subcommands.
This commit is contained in:
parent
6d3dc6dfcd
commit
20c5f9d103
1 changed files with 10 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ import sys
|
|||
import click
|
||||
import logging
|
||||
import typing as typ
|
||||
import subprocess as sp
|
||||
|
||||
from . import vcs
|
||||
from . import config
|
||||
|
|
@ -346,7 +347,15 @@ def bump(
|
|||
if dry:
|
||||
return
|
||||
|
||||
_bump(cfg, new_version, allow_dirty)
|
||||
try:
|
||||
_bump(cfg, new_version, allow_dirty)
|
||||
except sp.CalledProcessError as ex:
|
||||
log.error(f"Error running subcommand: {ex.cmd}")
|
||||
if ex.stdout:
|
||||
sys.stdout.write(ex.stdout.decode('utf-8'))
|
||||
if ex.stderr:
|
||||
sys.stderr.write(ex.stderr.decode('utf-8'))
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue