From 549a0aa28fab6a0d18c3b6d83a5bc588c2c5d004 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 25 Apr 2021 17:27:02 +0200 Subject: util.prosodyctl.shell: Fix for missing 'sep' arg to string.rep in Lua 5.1 --- util/prosodyctl/shell.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util/prosodyctl/shell.lua') 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() -- cgit v1.2.3