Diff

util/startup.lua @ 10603:dbd60f473164 0.11 0.11.5

util.startup: Ensure prosody.opts exists even when no options provided
author Matthew Wild <mwild1@gmail.com>
date Sun, 19 Jan 2020 15:50:32 +0000
parent 10602:f23add0df461
child 10604:3b0d9919f361
child 10947:801b9d5957a6
line wrap: on
line diff
--- a/util/startup.lua	Sun Jan 19 15:50:16 2020 +0000
+++ b/util/startup.lua	Sun Jan 19 15:50:32 2020 +0000
@@ -17,6 +17,7 @@
 
 function startup.parse_args()
 	local parsed_opts = {};
+	prosody.opts = parsed_opts;
 
 	if #arg == 0 then
 		return;
@@ -64,7 +65,6 @@
 		end
 		parsed_opts[param_k] = param_v;
 	end
-	prosody.opts = parsed_opts;
 end
 
 function startup.read_config()