From ef24d8cd72873a4cb0e222bd8374551925da3eb9 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 5 Oct 2020 21:23:39 +0200 Subject: util.prosodyctl: Simplify luarocks invocation --- util/prosodyctl.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'util/prosodyctl.lua') diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua index b80ce46b..80052163 100644 --- a/util/prosodyctl.lua +++ b/util/prosodyctl.lua @@ -234,13 +234,9 @@ local function call_luarocks(operation, mod, server) elseif operation == "remove" then show_message("Removing %s from %s", mod, dir); end - if operation == "list" then - 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 = server; - })); - end + os.execute(render_cli("luarocks {op} --tree={dir} {server&--server={server}} {mod?}", { + dir = dir; op = operation; mod = mod; server = server; + })); if operation == "install" then show_module_configuration_help(mod); end -- cgit v1.2.3