Software /
code /
prosody
Diff
prosodyctl @ 6498:ce66fe13eebe
prosodyctl: Fix nil global access traceback in `prosodyctl about` (luarocks 2.2.0 no longer uses module())
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 19 Oct 2014 03:05:49 -0400 |
parent | 6356:fb1535328ac7 |
child | 6501:71b6e8b48a12 |
child | 7676:7311dc843718 |
line wrap: on
line diff
--- a/prosodyctl Wed Oct 15 00:39:37 2014 +0100 +++ b/prosodyctl Sun Oct 19 03:05:49 2014 -0400 @@ -548,7 +548,7 @@ 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);