Software /
code /
prosody
Diff
prosodyctl @ 3904:f93163081b3c
prosody, prosodyctl, util.dependencies: Split checking and logging of dependencies so we can check hard deps before the config and logging is loaded
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 20 Dec 2010 14:06:16 +0000 |
parent | 3777:5ecbcef42ffb |
child | 3998:009d1ad84b49 |
line wrap: on
line diff
--- a/prosodyctl Sun Dec 19 20:28:58 2010 +0500 +++ b/prosodyctl Mon Dec 20 14:06:16 2010 +0000 @@ -41,6 +41,11 @@ }; local prosody = prosody; +local dependencies = require "util.dependencies"; +if not dependencies.check_dependencies() then + os.exit(1); +end + config = require "core.configmanager" do @@ -94,9 +99,7 @@ require "core.loggingmanager" -if not require "util.dependencies".check_dependencies() then - os.exit(1); -end +dependencies.log_warnings(); local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data"; require "util.datamanager".set_data_path(data_path);