prosody: Check dependencies (and load LuaRocks) earlier on in the startup process

Thu, 28 Jan 2010 18:11:03 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 28 Jan 2010 18:11:03 +0000
changeset 2514
163b2aef5aff
parent 2513
a8aa7616b154
child 2515
50517948705c

prosody: Check dependencies (and load LuaRocks) earlier on in the startup process

prosody file | annotate | diff | comparison | revisions
--- a/prosody	Thu Jan 28 18:10:20 2010 +0000
+++ b/prosody	Thu Jan 28 18:11:03 2010 +0000
@@ -32,8 +32,10 @@
 	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 @@
 	-- 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	

mercurial