diff options
author | Kim Alvefur <zash@zash.se> | 2021-07-29 14:10:56 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-07-29 14:10:56 +0200 |
commit | f98cf3899499baf3847ece50b41d4e3a733a674d (patch) | |
tree | dd2f53659b537142d39bd2a3f8782f49f49a9ce1 /tools/migration/prosody-migrator.lua | |
parent | 08e7a84274c58e15a00fff28e0fb27ac66272305 (diff) | |
download | prosody-f98cf3899499baf3847ece50b41d4e3a733a674d.tar.gz prosody-f98cf3899499baf3847ece50b41d4e3a733a674d.zip |
migrator: Use parsed command line flags already parsed by util.startup
Diffstat (limited to 'tools/migration/prosody-migrator.lua')
-rw-r--r-- | tools/migration/prosody-migrator.lua | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/tools/migration/prosody-migrator.lua b/tools/migration/prosody-migrator.lua index 976feb7d..511d0730 100644 --- a/tools/migration/prosody-migrator.lua +++ b/tools/migration/prosody-migrator.lua @@ -57,20 +57,7 @@ do 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; |