if command fails, print command and exit code, regardless if error message is set
This commit is contained in:
@@ -414,8 +414,11 @@ def main() -> None:
|
||||
args.func(args)
|
||||
except ClanError as e:
|
||||
if isinstance(e, ClanCmdError):
|
||||
msg = ""
|
||||
if e.cmd.msg:
|
||||
log.fatal(e.cmd.msg)
|
||||
msg += f"{e.cmd.msg}: "
|
||||
msg += f"command exited with code {e.cmd.returncode}: {e.cmd.command}"
|
||||
log.error(msg) # noqa: TRY400
|
||||
sys.exit(1)
|
||||
|
||||
log.fatal(e.msg)
|
||||
|
||||
Reference in New Issue
Block a user