File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 14
14
15
15
import os
16
16
import subprocess
17
+ from subprocess import CalledProcessError
17
18
18
19
import tomli
19
20
@@ -28,12 +29,18 @@ def get_instrumentation_packages():
28
29
if not os .path .isdir (pkg_path ):
29
30
continue
30
31
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
+
37
44
pyproject_toml_path = os .path .join (pkg_path , "pyproject.toml" )
38
45
39
46
with open (pyproject_toml_path , "rb" ) as file :
You can’t perform that action at this time.
0 commit comments