Comparison

prosodyctl @ 2510:97b5ea975cb9

util.dependencies, prosody, prosodyctl: Give util.dependencies a check_dependencies() function so the caller can decide what to do when dependencies aren't met - update prosody/prosodyctl for this change
author Matthew Wild <mwild1@gmail.com>
date Thu, 28 Jan 2010 14:56:47 +0000
parent 2497:810fb77b6fe6
child 2511:a81c710b1708
comparison
equal deleted inserted replaced
2509:e8a0f2368cde 2510:97b5ea975cb9
27 if os.getenv("HOME") then 27 if os.getenv("HOME") then
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 if not require "util.dependencies".check_dependencies() then
33 os.exit(1);
34 end
35
32 -- Required to be able to find packages installed with luarocks 36 -- Required to be able to find packages installed with luarocks
33 pcall(require, "luarocks.require") 37 pcall(require, "luarocks.require")
34 38
35 require "util.dependencies"
36 39
37 config = require "core.configmanager" 40 config = require "core.configmanager"
38 41
39 do 42 do
40 -- TODO: Check for other formats when we add support for them 43 -- TODO: Check for other formats when we add support for them