aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-10-05 21:23:39 +0200
committerKim Alvefur <zash@zash.se>2020-10-05 21:23:39 +0200
commitef24d8cd72873a4cb0e222bd8374551925da3eb9 (patch)
treec34b4932b591b70832e9faf8a733372b326f38c1
parent42eec522a3a327185ee358ac77cf894e93c221e8 (diff)
downloadprosody-ef24d8cd72873a4cb0e222bd8374551925da3eb9.tar.gz
prosody-ef24d8cd72873a4cb0e222bd8374551925da3eb9.zip
util.prosodyctl: Simplify luarocks invocation
-rw-r--r--util/prosodyctl.lua10
1 files changed, 3 insertions, 7 deletions
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