Software /
code /
prosody
Changeset
11490:34d4e4a01ef8
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 16 Mar 2021 02:44:22 +0100 |
parents | 11489:37f49d0ad22c |
children | 11491:c3fb802f9e45 |
files | util/prosodyctl.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/util/prosodyctl.lua Fri Mar 26 13:03:22 2021 +0100 +++ b/util/prosodyctl.lua Tue Mar 16 02:44:22 2021 +0100 @@ -221,8 +221,8 @@ 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;