mirror of
https://github.com/frappe/bench.git
synced 2025-01-24 23:48:24 +00:00
fix: Always set return code via cli
This commit is contained in:
parent
a94ea19bf4
commit
552b935f6b
@ -69,6 +69,13 @@ def cli():
|
||||
return_code = getattr(e, "code", 0)
|
||||
if return_code:
|
||||
logger.warning(f"{command} executed with exit code {return_code}")
|
||||
if isinstance(e, Exception):
|
||||
raise e
|
||||
finally:
|
||||
try:
|
||||
return_code
|
||||
except NameError:
|
||||
return_code = 0
|
||||
sys.exit(return_code)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user