2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-13 16:56:33 +00:00

fix: Print failing command with CommandFailedError

I've seen way too many issues being faced / misunderstandings due to the
lack of "cmd"
This commit is contained in:
Gavin D'souza 2023-04-21 15:19:04 +05:30
parent 082692cae2
commit a1d2c5226b
No known key found for this signature in database
GPG Key ID: 3A7BF4D4340DE6F7

View File

@ -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