Skip to content

Commit

Permalink
fix: Print failing command with CommandFailedError
Browse files Browse the repository at this point in the history
I've seen way too many issues being faced / misunderstandings due to the
lack of "cmd"
  • Loading branch information
gavindsouza committed May 26, 2023
1 parent 082692c commit a1d2c52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bench/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def exec_cmd(cmd, cwd=".", env=None, _raise=True):
if return_code:
logger.warning(f"{cmd_log} executed with exit code {return_code}")
if _raise:
raise CommandFailedError from subprocess.CalledProcessError(return_code, cmd)
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
return return_code


Expand Down

0 comments on commit a1d2c52

Please sign in to comment.