prosodyctl: Fix nil global access traceback in prosodyctl about (luarocks 2.2.0 no longer uses module())

This commit is contained in:
Waqas Hussain 2014-10-19 03:05:49 -04:00
parent a01db8f9df
commit 5daa7d9387

View file

@ -548,7 +548,7 @@ function commands.about(arg)
print(" "..path);
end
print("");
local luarocks_status = (pcall(require, "luarocks.loader") and "Installed ("..(luarocks.cfg.program_version or "2.x+")..")")
local luarocks_status = (pcall(require, "luarocks.loader") and "Installed ("..(package.loaded["luarocks.cfg"].program_version or "2.x+")..")")
or (pcall(require, "luarocks.require") and "Installed (1.x)")
or "Not installed";
print("LuaRocks: ", luarocks_status);