Software /
code /
prosody
Changeset
11730:9bf8a0607d12
migrator: Use parsed command line flags already parsed by util.startup
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 29 Jul 2021 14:10:56 +0200 |
parents | 11729:f37cafeb75d6 |
children | 11731:076ceb405b94 |
files | tools/migration/prosody-migrator.lua |
diffstat | 1 files changed, 1 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/migration/prosody-migrator.lua Thu Jul 29 14:06:14 2021 +0200 +++ b/tools/migration/prosody-migrator.lua Thu Jul 29 14:10:56 2021 +0200 @@ -57,20 +57,7 @@ end -- Command-line parsing -local options = {}; -local i = 1; -while arg[i] do - if arg[i]:sub(1,2) == "--" then - local opt, val = arg[i]:match("([%w-]+)=?(.*)"); - if opt then - options[(opt:sub(3):gsub("%-", "_"))] = #val > 0 and val or true; - end - table.remove(arg, i); - else - i = i + 1; - end -end - +local options = prosody.opts; local envloadfile = require "util.envload".envloadfile;