Comparison

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
comparison
equal deleted inserted replaced
4332:8154bc28e520 4333:040193dead77
513 print("Lua C module search paths:"); 513 print("Lua C module search paths:");
514 for path in package.cpath:gmatch("[^;]+") do 514 for path in package.cpath:gmatch("[^;]+") do
515 print(" "..path); 515 print(" "..path);
516 end 516 end
517 print(""); 517 print("");
518 local luarocks_status = (pcall(require, "luarocks.loader") and "Installed ("..(luarocks.cfg.program_version or "2.x+")..")")
519 or (pcall(require, "luarocks.require") and "Installed (1.x+)")
520 or "Not installed";
521 print("LuaRocks: ", luarocks_status);
522 print("");
518 print("# Lua module versions"); 523 print("# Lua module versions");
519 local module_versions, longest_name = {}, 8; 524 local module_versions, longest_name = {}, 8;
520 for name, module in pairs(package.loaded) do 525 for name, module in pairs(package.loaded) do
521 if type(module) == "table" and rawget(module, "_VERSION") 526 if type(module) == "table" and rawget(module, "_VERSION")
522 and name ~= "_G" and not name:match("%.") then 527 and name ~= "_G" and not name:match("%.") then