aboutsummaryrefslogtreecommitdiffstats
path: root/util/startup.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-01-09 15:16:09 +0100
committerKim Alvefur <zash@zash.se>2022-01-09 15:16:09 +0100
commit552af220f49fffc964532305a05148e2362297e1 (patch)
treefaae5b5695e758c12dc1be15cf776768cf3606f5 /util/startup.lua
parent2cb9d62b2b9fe42167f2b4ceda3c8f002e152662 (diff)
downloadprosody-552af220f49fffc964532305a05148e2362297e1.tar.gz
prosody-552af220f49fffc964532305a05148e2362297e1.zip
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.
Diffstat (limited to 'util/startup.lua')
-rw-r--r--util/startup.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/startup.lua b/util/startup.lua
index 68f2d542..5db1c51a 100644
--- a/util/startup.lua
+++ b/util/startup.lua
@@ -33,8 +33,8 @@ local arg_settigs = {
};
}
-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));