Skip to content

Commit dd2f55a

Browse files
committed
Debug
1 parent a4dfbc5 commit dd2f55a

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

python/jupytercad/scripts/bump-version.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from typing import List
99
from packaging.version import parse as parse_version
1010
from pathlib import Path
11-
from subprocess import run
11+
from subprocess import run, CalledProcessError
1212
import tomlkit
1313

1414
ENC = dict(encoding="utf-8")
@@ -17,9 +17,19 @@
1717

1818

1919
def get_version():
20-
cmd = run([HATCH_VERSION], capture_output=True, shell=True, check=True, cwd=ROOT)
21-
return cmd.stdout.decode("utf-8").strip().split("\n")[-1]
20+
try:
21+
cmd = run([HATCH_VERSION], capture_output=True, shell=True, check=True, cwd=ROOT)
22+
return cmd.stdout.decode("utf-8").strip().split("\n")[-1]
23+
except CalledProcessError as e:
24+
print("Command failed: %s", HATCH_VERSION)
25+
print("Return code: %s", e.returncode)
2226

27+
if e.stdout:
28+
print("STDOUT:\n%s", e.stdout.decode("utf-8", errors="ignore"))
29+
if e.stderr:
30+
print("STDERR:\n%s", e.stderr.decode("utf-8", errors="ignore"))
31+
32+
raise
2333

2434
def next_version():
2535
v = parse_version(get_version())

0 commit comments

Comments
 (0)