Changeset

10185:02d8f475a96d

util.prosodyctl: call_luarocks function is now compatible with the list command
author João Duarte <jvsDuarte08@gmail.com>
date Wed, 31 Jul 2019 10:22:11 -0700
parents 10184:5655cd9fc8e9
children 10186:520e879a40f2
files util/prosodyctl.lua
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/prosodyctl.lua	Wed Jul 31 10:07:22 2019 -0700
+++ b/util/prosodyctl.lua	Wed Jul 31 10:22:11 2019 -0700
@@ -312,7 +312,11 @@
 	elseif operation == "remove" then
 		show_message("Removing %s from %s", mod, dir);
 	end
-	os.execute("luarocks --tree='"..dir.."' --server='http://localhost/' "..operation.." "..mod);
+	if operation == "list" then
+		os.execute("luarocks list --tree='"..dir.."'")
+	else
+		os.execute("luarocks --tree='"..dir.."' --server='http://localhost/' "..operation.." "..mod);
+	end
 	if operation == "install" then
 		show_module_configuration_help(mod);
 	end