aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl.lua
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
commit1dba3e8c9d1159ac25639331f58fb5627454a465 (patch)
treec34b4932b591b70832e9faf8a733372b326f38c1 /util/prosodyctl.lua
parenta55b5ee6040dd6c67e9d9e2346db313ed46dbfc5 (diff)
downloadprosody-1dba3e8c9d1159ac25639331f58fb5627454a465.tar.gz
prosody-1dba3e8c9d1159ac25639331f58fb5627454a465.zip
util.prosodyctl: Simplify luarocks invocation
Diffstat (limited to 'util/prosodyctl.lua')
-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