diff options
author | Kim Alvefur <zash@zash.se> | 2019-06-29 16:54:39 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-06-29 16:54:39 +0200 |
commit | d2907f3c5d523dedb3daacfaa398efaa7987bdfd (patch) | |
tree | 9a7e11dc9583cd3182d51f4f6ff9aa872abb3a31 /prosodyctl | |
parent | d64c3ffda48fa9b263f29e8f30a86ef3b3edb04b (diff) | |
download | prosody-d2907f3c5d523dedb3daacfaa398efaa7987bdfd.tar.gz prosody-d2907f3c5d523dedb3daacfaa398efaa7987bdfd.zip |
prosodyctl: Fix extraction of interpreter from arg when additional arguments (fixes #1386)
Interpreter goes into the lowest negative index.
See http://www.lua.org/manual/5.2/manual.html#7
Diffstat (limited to 'prosodyctl')
-rwxr-xr-x | prosodyctl | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -222,7 +222,15 @@ function commands.start(arg) end --luacheck: ignore 411/ret - local ok, ret = prosodyctl.start(prosody.paths.source, arg[-1]); + local lua; + do + local i = 0; + repeat + i = i - 1; + until arg[i-1] == nil + lua = arg[i]; + end + local ok, ret = prosodyctl.start(prosody.paths.source, lua); if ok then local daemonize = configmanager.get("*", "daemonize"); if daemonize == nil then |