Skip to content

Commit

Permalink
Merge pull request #8 from jhermann/patch-1
Browse files Browse the repository at this point in the history
Better reporting of command failures
  • Loading branch information
orsinium authored May 28, 2020
2 parents 2031e40 + ea9c7e3 commit 444487e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dephell_setuptools/_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ def content(self) -> Dict[str, Any]:
env=env,
)
if result.returncode != 0:
raise RuntimeError(result.stderr.decode().strip().split('\n')[-1])
raise RuntimeError('Command {!r} failed in {} with RC={}: {}'.format(
cmd,
os.getcwd(),
result.returncode,
result.stderr.decode('utf-8').strip().split('\n')[-1],
))

with output_json.open() as stream:
content = json.load(stream)
Expand Down

0 comments on commit 444487e

Please sign in to comment.