Add better debugging if hatch subprocess fails (#1672)
This commit is contained in:
parent
1e89854832
commit
ffbbb4d8e3
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
import os
|
||||
import subprocess
|
||||
from subprocess import CalledProcessError
|
||||
|
||||
import tomli
|
||||
|
||||
|
|
@ -28,12 +29,18 @@ def get_instrumentation_packages():
|
|||
if not os.path.isdir(pkg_path):
|
||||
continue
|
||||
|
||||
version = subprocess.check_output(
|
||||
"hatch version",
|
||||
shell=True,
|
||||
cwd=pkg_path,
|
||||
universal_newlines=True,
|
||||
)
|
||||
try:
|
||||
version = subprocess.check_output(
|
||||
"hatch version",
|
||||
shell=True,
|
||||
cwd=pkg_path,
|
||||
universal_newlines=True,
|
||||
)
|
||||
except CalledProcessError as exc:
|
||||
print(f"Could not get hatch version from path {pkg_path}")
|
||||
print(exc.output)
|
||||
raise exc
|
||||
|
||||
pyproject_toml_path = os.path.join(pkg_path, "pyproject.toml")
|
||||
|
||||
with open(pyproject_toml_path, "rb") as file:
|
||||
|
|
|
|||
Loading…
Reference in New Issue