From f98cf3899499baf3847ece50b41d4e3a733a674d Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 29 Jul 2021 14:10:56 +0200 Subject: migrator: Use parsed command line flags already parsed by util.startup --- tools/migration/prosody-migrator.lua | 15 +-------------- 1 file changed, 1 insertion(+), 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; -- cgit v1.2.3