aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-03-16 02:44:22 +0100
committerKim Alvefur <zash@zash.se>2021-03-16 02:44:22 +0100
commit7bd27186017848de0853d25a08fc6a36c59e6e66 (patch)
treed45b2fe175a7615215570f0af621d8843073b70f /util
parent483a869009864f1fdd63830574ee7cd690113e17 (diff)
downloadprosody-7bd27186017848de0853d25a08fc6a36c59e6e66.tar.gz
prosody-7bd27186017848de0853d25a08fc6a36c59e6e66.zip
util.prosodyctl: Install plugins for current Lua version
Fixes that luarocks defaults to installing the rock for its own runtime version of Lua. This only works with luarocks 3.x, it does nothing on 2.x as currently available from Debian.
Diffstat (limited to 'util')
-rw-r--r--util/prosodyctl.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua
index f7d9a3cc..4d49cd16 100644
--- a/util/prosodyctl.lua
+++ b/util/prosodyctl.lua
@@ -221,8 +221,8 @@ local render_cli = interpolation.new("%b{}", function (s) return "'"..s:gsub("'"
local function call_luarocks(operation, mod, server)
local dir = prosody.paths.installer;
- local ok, _, code = os.execute(render_cli("luarocks {op} --tree={dir} {server&--server={server}} {mod?}", {
- dir = dir; op = operation; mod = mod; server = server;
+ local ok, _, code = os.execute(render_cli("luarocks --lua-version={luav} {op} --tree={dir} {server&--server={server}} {mod?}", {
+ dir = dir; op = operation; mod = mod; server = server; luav = _VERSION:match("5%.%d");
}));
if type(ok) == "number" then code = ok; end
return code;