From fcb296d768c407917d0bbf5fb43513a3c4d1e006 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Sat, 25 Mar 2023 01:57:04 +0300 Subject: [PATCH] fix(cli): Return success if --help explicitly requested --- core/cli.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/cli.lua b/core/cli.lua index fc6d5cc38..1f8027a9e 100644 --- a/core/cli.lua +++ b/core/cli.lua @@ -38,7 +38,8 @@ cli.parseArguments = function () local opts, parse_err = cliargs:parse(_arg) if not opts and parse_err then print(parse_err) - os.exit(1) + local code = parse_err:match("^Usage:") and 0 or 1 + os.exit(code) end if opts.INPUT then if opts.INPUT == "STDIO" then