# HG changeset patch # User Kim Alvefur # Date 1627560656 -7200 # Node ID 9bf8a0607d128b18ea9a2246100d4beac8d2144e # Parent f37cafeb75d61c5fb28a21cc157abdd79b6f0313 migrator: Use parsed command line flags already parsed by util.startup diff -r f37cafeb75d6 -r 9bf8a0607d12 tools/migration/prosody-migrator.lua --- 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;