# HG changeset patch # User Kim Alvefur # Date 1591082347 -7200 # Node ID 98c5355314501ac02ae242c94d80737d92815571 # Parent 813e632431e65be9e94dfc52d5dd6837294a0015 util.prosodyctl.shell: Really fix --socket option Forgot it stops parsing --foo options at the first argument, so subsequent commands need to parse their own options like this. diff -r 813e632431e6 -r 98c535531450 util/prosodyctl/shell.lua --- a/util/prosodyctl/shell.lua Tue Jun 02 09:07:29 2020 +0200 +++ b/util/prosodyctl/shell.lua Tue Jun 02 09:19:07 2020 +0200 @@ -10,6 +10,7 @@ local server = require "net.server"; local st = require "util.stanza"; local path = require "util.paths"; +local parse_args = require "util.argparse".parse; local have_readline, readline = pcall(require, "readline"); @@ -91,6 +92,7 @@ local function start(arg) --luacheck: ignore 212/arg local client = adminstream.client(); + local opts = parse_args(arg); client.events.add_handler("connected", function () if not arg.quiet then @@ -114,7 +116,7 @@ end end); - local socket_path = path.resolve_relative_path(prosody.paths.data, prosody.opts.socket or config.get("*", "admin_socket") or "prosody.sock"); + local socket_path = path.resolve_relative_path(prosody.paths.data, opts.socket or config.get("*", "admin_socket") or "prosody.sock"); local conn = connection(socket_path, client.listeners); local ok, err = conn:connect(); if not ok then