diff options
author | Kim Alvefur <zash@zash.se> | 2022-01-09 15:16:09 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2022-01-09 15:16:09 +0100 |
commit | 552af220f49fffc964532305a05148e2362297e1 (patch) | |
tree | faae5b5695e758c12dc1be15cf776768cf3606f5 | |
parent | 2cb9d62b2b9fe42167f2b4ceda3c8f002e152662 (diff) | |
download | prosody-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.
-rw-r--r-- | util/startup.lua | 4 |
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)); |