From 28aadca557b90b2a3a981aecd4626b577c002346 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 5 Oct 2020 21:24:07 +0200 Subject: util.prosodyctl: Move hardcoded luarocks server into prosodyctl To be replaced with config option in future commit --- prosodyctl | 2 +- util/prosodyctl.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/prosodyctl b/prosodyctl index 928d2bec..ca631047 100755 --- a/prosodyctl +++ b/prosodyctl @@ -78,7 +78,7 @@ function commands.install(arg) show_usage([[install]], [[Installs a prosody/luarocks plugin]]); return 1; end - call_luarocks("install", arg[1]); + call_luarocks("install", arg[1], "http://localhost/"); end function commands.remove(arg) diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua index 28347455..b80ce46b 100644 --- a/util/prosodyctl.lua +++ b/util/prosodyctl.lua @@ -227,7 +227,7 @@ end local render_cli = interpolation.new("%b{}", function (s) return "'"..s:gsub("'","'\\''").."'" end) -local function call_luarocks(operation, mod) +local function call_luarocks(operation, mod, server) local dir = get_path_custom_plugins(prosody.paths.plugins); if operation == "install" then show_message("Installing %s at %s", mod, dir); @@ -238,7 +238,7 @@ local function call_luarocks(operation, mod) os.execute(render_cli("luarocks list --tree={dir}", {dir = dir})); else os.execute(render_cli("luarocks {op} --tree={dir} {server&--server={server}} {mod}", { - dir = dir; op = operation; mod = mod; server = "http://localhost/"; + dir = dir; op = operation; mod = mod; server = server; })); end if operation == "install" then -- cgit v1.2.3