diff options
author | Matthew Wild <mwild1@gmail.com> | 2022-04-25 16:35:10 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2022-04-25 16:35:10 +0100 |
commit | 07ee0f44708425c9cfb9381b9030692550a8cf32 (patch) | |
tree | 0a5cd9e767ade3f8d1ab2a55c45f7a30bce23952 /util | |
parent | fc5a8d7f4a909e60fc89a495a57950c1f4eb6166 (diff) | |
parent | 93347db1241f8c803c24c6cf615389cb237f0031 (diff) | |
download | prosody-07ee0f44708425c9cfb9381b9030692550a8cf32.tar.gz prosody-07ee0f44708425c9cfb9381b9030692550a8cf32.zip |
Merge 0.12->trunk
Diffstat (limited to 'util')
-rw-r--r-- | util/argparse.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/util/argparse.lua b/util/argparse.lua index 6d227b5b..9ece050a 100644 --- a/util/argparse.lua +++ b/util/argparse.lua @@ -5,7 +5,7 @@ local function parse(arg, config) local parsed_opts = {}; if #arg == 0 then - return parsed_opts, arg; + return parsed_opts; end while true do local raw_param = arg[1]; @@ -47,7 +47,10 @@ local function parse(arg, config) end parsed_opts[param_k] = param_v; end - return parsed_opts, arg; + for i = 1, #arg do + parsed_opts[i] = arg[i]; + end + return parsed_opts; end return { |