mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 11:02:20 +00:00
Merge pull request #1 from stepelu/fix
Compatibility with strict.lua and other checkers.
This commit is contained in:
@@ -604,7 +604,8 @@ local function plural(x)
|
||||
return "s"
|
||||
end
|
||||
|
||||
local default_cmdline = arg or {}
|
||||
-- Compatibility with strict.lua and other checkers:
|
||||
local default_cmdline = rawget(_G, "arg") or {}
|
||||
|
||||
function Parser:_parse(args, errhandler)
|
||||
args = args or default_cmdline
|
||||
|
Reference in New Issue
Block a user