force - to be the only argument

This commit is contained in:
Codinget 2020-12-29 17:16:44 +01:00
parent f04ae47efb
commit 7de31c59d3

View File

@ -24,6 +24,11 @@ local read_stdin = arg[1] == "-" -- luacheck: ignore 113
if not read_stdin then
parser:argument("file/directory"):args("+")
else
if arg[2] ~= nil then
io.stderr:write("- must be the only argument\n")
os.exit(1)
end
end
local opts = read_stdin and {} or parser:parse()