aboutsummaryrefslogtreecommitdiffstats
path: root/prosody
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-28 18:11:03 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-28 18:11:03 +0000
commitd32bfb15fd14b4ff31662d11f4eb8280b035d034 (patch)
treed5f18b822f4fc984f7a2a393d85a2d2dfcfe8ceb /prosody
parent7086dd06fe621c3369388bb4a1ac9ef1deaa7635 (diff)
downloadprosody-d32bfb15fd14b4ff31662d11f4eb8280b035d034.tar.gz
prosody-d32bfb15fd14b4ff31662d11f4eb8280b035d034.zip
prosody: Check dependencies (and load LuaRocks) earlier on in the startup process
Diffstat (limited to 'prosody')
-rwxr-xr-xprosody11
1 files changed, 4 insertions, 7 deletions
diff --git a/prosody b/prosody
index 52251dac..542787df 100755
--- a/prosody
+++ b/prosody
@@ -32,8 +32,10 @@ if CFG_DATADIR then
end
end
--- Required to be able to find packages installed with luarocks
-pcall(require, "luarocks.require");
+-- Check runtime dependencies
+if not require "util.dependencies".check_dependencies() then
+ os.exit(1);
+end
-- Replace require() with one that doesn't pollute _G, required
-- for neat sandboxing of modules
@@ -113,11 +115,6 @@ function load_libraries()
-- Initialize logging
require "core.loggingmanager"
- -- Check runtime dependencies
- if not require "util.dependencies".check_dependencies() then
- os.exit(1);
- end
-
-- Load socket framework
server = require "net.server"
end