Changeset

12160:ac654fb19203

util.startup: Allow supplying an argument parsing settings The 'prosody' global is not global this early so there was no way to override the process type field or argument parsing settings from outside, e.g. from the migrator.
author Kim Alvefur <zash@zash.se>
date Sun, 09 Jan 2022 15:16:09 +0100
parents 12159:aa299551f8c6
children 12161:6e7678f6fe9a
files util/startup.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/util/startup.lua	Sat Jan 08 18:02:32 2022 +0100
+++ b/util/startup.lua	Sun Jan 09 15:16:09 2022 +0100
@@ -33,8 +33,8 @@
 	};
 }
 
-function startup.parse_args()
-	local opts, err, where = parse_args(arg, arg_settigs[prosody.process_type]);
+function startup.parse_args(profile)
+	local opts, err, where = parse_args(arg, arg_settigs[profile or prosody.process_type] or profile);
 	if not opts then
 		if err == "param-not-found" then
 			print("Unknown command-line option: "..tostring(where));