prosodyctl: Add info about the presence of LuaRocks to 'about' command
authorMatthew Wild <mwild1@gmail.com>
Wed, 27 Jul 2011 18:06:46 +0000 (14:06 -0400)
committerMatthew Wild <mwild1@gmail.com>
Wed, 27 Jul 2011 18:06:46 +0000 (14:06 -0400)
prosodyctl

index a9858c445eab4ff6de771760546145942207e770..37e9558674c2f841cde1028faf8e458645da1f17 100755 (executable)
@@ -515,6 +515,11 @@ function commands.about(arg)
                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