Skip to content

Commit ad78495

Browse files
committed
Exit with 1 when requesting an invalid subcommand
Quark prints the available command list when no command or an invalid command was requested. This can be considered an error and we should exit with a status code != 0, so that e.g. CI pipelines can promptly fail.
1 parent 6041759 commit ad78495

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bin/quark

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def main():
2020
print("Available commands:")
2121
for cmd, _ in sorted(commands):
2222
print(" %s" % cmd)
23+
sys.exit(1)
2324

2425
if __name__ == "__main__":
2526
main()

0 commit comments

Comments
 (0)