Diff

prosodyctl @ 4333:040193dead77

prosodyctl: Add info about the presence of LuaRocks to 'about' command
author Matthew Wild <mwild1@gmail.com>
date Wed, 27 Jul 2011 14:06:46 -0400
parent 4331:9c45858e3208
child 4334:cd1b73582711
line wrap: on
line diff
--- a/prosodyctl	Wed Jul 20 17:22:21 2011 -0400
+++ b/prosodyctl	Wed Jul 27 14:06:46 2011 -0400
@@ -515,6 +515,11 @@
 		print("  "..path);
 	end
 	print("");
+	local luarocks_status = (pcall(require, "luarocks.loader") and "Installed ("..(luarocks.cfg.program_version or "2.x+")..")")
+		or (pcall(require, "luarocks.require") and "Installed (1.x+)")
+		or "Not installed";
+	print("LuaRocks:        ", luarocks_status);
+	print("");
 	print("# Lua module versions");
 	local module_versions, longest_name = {}, 8;
 	for name, module in pairs(package.loaded) do