aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-04-25 17:27:02 +0200
committerKim Alvefur <zash@zash.se>2021-04-25 17:27:02 +0200
commit549a0aa28fab6a0d18c3b6d83a5bc588c2c5d004 (patch)
tree83a3a735adbce1b1baf5e9933aceda4ea75c1649
parentea470c72e0517a1128f6152c4fc1233c59a040eb (diff)
downloadprosody-549a0aa28fab6a0d18c3b6d83a5bc588c2c5d004.tar.gz
prosody-549a0aa28fab6a0d18c3b6d83a5bc588c2c5d004.zip
util.prosodyctl.shell: Fix for missing 'sep' arg to string.rep in Lua 5.1
-rw-r--r--util/prosodyctl/shell.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/prosodyctl/shell.lua b/util/prosodyctl/shell.lua
index f4bc478d..4e112a14 100644
--- a/util/prosodyctl/shell.lua
+++ b/util/prosodyctl/shell.lua
@@ -74,7 +74,8 @@ local function start(arg) --luacheck: ignore 212/arg
if arg[1] then
if arg[2] then
-- prosodyctl shell module reload foo bar.com --> module:reload("foo", "bar.com")
- arg[1] = string.format("%s:%s("..string.rep("%q", #arg-2, ", ")..")", table.unpack(arg));
+ -- COMPAT Lua 5.1 doesn't have the separator argument to string.rep
+ arg[1] = string.format("%s:%s("..string.rep("%q, ", #arg-2):sub(1, -3)..")", table.unpack(arg));
end
client.events.add_handler("connected", function()