Changeset

11136:d0d3e25b7300

util.prosodyctl: Simplify luarocks invocation
author Kim Alvefur <zash@zash.se>
date Mon, 05 Oct 2020 21:23:39 +0200
parents 11135:56490ffde93f
children 11137:e6c4975a9017
files util/prosodyctl.lua
diffstat 1 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/util/prosodyctl.lua	Mon Oct 05 21:24:14 2020 +0200
+++ b/util/prosodyctl.lua	Mon Oct 05 21:23:39 2020 +0200
@@ -234,13 +234,9 @@
 	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