Skip to content

Commit f5b7288

Browse files
authored
Merge branch 'main' into headers
2 parents 35ad997 + ffbbb4d commit f5b7288

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

scripts/otel_packaging.py

+13-6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import os
1616
import subprocess
17+
from subprocess import CalledProcessError
1718

1819
import tomli
1920

@@ -28,12 +29,18 @@ def get_instrumentation_packages():
2829
if not os.path.isdir(pkg_path):
2930
continue
3031

31-
version = subprocess.check_output(
32-
"hatch version",
33-
shell=True,
34-
cwd=pkg_path,
35-
universal_newlines=True,
36-
)
32+
try:
33+
version = subprocess.check_output(
34+
"hatch version",
35+
shell=True,
36+
cwd=pkg_path,
37+
universal_newlines=True,
38+
)
39+
except CalledProcessError as exc:
40+
print(f"Could not get hatch version from path {pkg_path}")
41+
print(exc.output)
42+
raise exc
43+
3744
pyproject_toml_path = os.path.join(pkg_path, "pyproject.toml")
3845

3946
with open(pyproject_toml_path, "rb") as file:

0 commit comments

Comments
 (0)