Skip to content

Commit

Permalink
ENH: Raise errors from other subprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
cortadocodes committed Dec 19, 2022
1 parent 936064d commit c3a46ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions check_semantic_version/check_semantic_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,11 @@ def _get_expected_semantic_version(version_source_type, breaking_change_indicate
configuration.write(path=config_path)
else:
config_path = os.path.abspath("mkver.conf")

logger.warning("`mkver.conf` file found at %r. Ignoring `breaking_change_indicated_by` input.", config_path)

process = subprocess.run(["git-mkver", "-c", config_path, "next"], capture_output=True)
try:
process = subprocess.run(["git-mkver", "-c", config_path, "next"], capture_output=True, check=True)
except subprocess.CalledProcessError as e:
raise CalledProcessError(returncode=e.returncode, cmd=e.cmd, output=e.output, stderr=e.stderr) from None

return process.stdout.strip().decode("utf8")

0 comments on commit c3a46ac

Please sign in to comment.