Software / code / prosody
Comparison
prosodyctl @ 2798:2702ee68727d
prosodyctl: Fix to load LuaRocks 2.x if we have it
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 03 Mar 2010 20:12:24 +0000 |
| parent | 2786:534e171036ef |
comparison
equal
deleted
inserted
replaced
| 2797:76777fee99b7 | 2798:2702ee68727d |
|---|---|
| 28 CFG_DATADIR = CFG_DATADIR:gsub("^~", os.getenv("HOME")); | 28 CFG_DATADIR = CFG_DATADIR:gsub("^~", os.getenv("HOME")); |
| 29 end | 29 end |
| 30 end | 30 end |
| 31 | 31 |
| 32 -- Required to be able to find packages installed with luarocks | 32 -- Required to be able to find packages installed with luarocks |
| 33 pcall(require, "luarocks.require") | 33 if not pcall(require, "luarocks.loader") then -- Try LuaRocks 2.x |
| 34 pcall(require, "luarocks.require") -- Try LuaRocks 1.x | |
| 35 end | |
| 36 | |
| 34 | 37 |
| 35 config = require "core.configmanager" | 38 config = require "core.configmanager" |
| 36 | 39 |
| 37 do | 40 do |
| 38 -- TODO: Check for other formats when we add support for them | 41 -- TODO: Check for other formats when we add support for them |