Fix: catch unknown flags in session command before API request
Previously, invalid flags like --invalid-flag were silently ignored, causing the CLI to make API requests that returned confusing 'timestamp expired' errors. Now prints 'Unknown option' and exits. Fixed in 21 implementations: rb, pl, php, lua, sh, cpp, d, rs, zig, v, kt, groovy, dart, cr, raku, ps1, m, nim, hs
This commit is contained in:
parent
c6813e5a18
commit
35b3ab615a
19 changed files with 100 additions and 17 deletions
5
un.lua
5
un.lua
|
|
@ -764,7 +764,10 @@ local function main()
|
|||
options.dump_file = arg[i]
|
||||
elseif a == "--extend" then
|
||||
options.extend = true
|
||||
elseif not a:match("^%-") then
|
||||
elseif a:match("^%-") then
|
||||
io.stderr:write(RED .. "Unknown option: " .. a .. RESET .. "\n")
|
||||
os.exit(1)
|
||||
else
|
||||
options.source_file = a
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue