mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
exit codes on error
This commit is contained in:
@ -187,7 +187,7 @@ def main():
|
|||||||
|
|
||||||
if sys.stdin.isatty():
|
if sys.stdin.isatty():
|
||||||
helptext('missing piped data')
|
helptext('missing piped data')
|
||||||
exit()
|
exit(1)
|
||||||
|
|
||||||
data = sys.stdin.read()
|
data = sys.stdin.read()
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ def main():
|
|||||||
|
|
||||||
if not found:
|
if not found:
|
||||||
helptext('missing or incorrect arguments')
|
helptext('missing or incorrect arguments')
|
||||||
exit()
|
exit(1)
|
||||||
|
|
||||||
json_out(result, pretty=pretty)
|
json_out(result, pretty=pretty)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user