Skip to content

Commit 444487e

Browse files
authored
Merge pull request #8 from jhermann/patch-1
Better reporting of command failures
2 parents 2031e40 + ea9c7e3 commit 444487e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

dephell_setuptools/_cmd.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ def content(self) -> Dict[str, Any]:
6060
env=env,
6161
)
6262
if result.returncode != 0:
63-
raise RuntimeError(result.stderr.decode().strip().split('\n')[-1])
63+
raise RuntimeError('Command {!r} failed in {} with RC={}: {}'.format(
64+
cmd,
65+
os.getcwd(),
66+
result.returncode,
67+
result.stderr.decode('utf-8').strip().split('\n')[-1],
68+
))
6469

6570
with output_json.open() as stream:
6671
content = json.load(stream)

0 commit comments

Comments
 (0)