Return status from running command
This way when someone use code like `sys.exit(main())` it will have proper exit code on error (so different than `0`). Story: 2001246 Task: 5776 Change-Id: I1c04fbf73d1fc44da7738c8f22296992d2e7a4f8
This commit is contained in:
@@ -106,7 +106,7 @@ def main(args=None):
|
|||||||
encoding = locale.getpreferredencoding()
|
encoding = locale.getpreferredencoding()
|
||||||
if encoding:
|
if encoding:
|
||||||
args = map(lambda arg: arg.decode(encoding), args)
|
args = map(lambda arg: arg.decode(encoding), args)
|
||||||
MonascaShell().run(args)
|
return MonascaShell().run(args)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if '--debug' in args or '-d' in args:
|
if '--debug' in args or '-d' in args:
|
||||||
raise
|
raise
|
||||||
|
|||||||
Reference in New Issue
Block a user