Changeset

12267:a52a0680fcd8

prosodyctl: Allow passing server on command line with --server Because why not I guess. This mirrors the corresponding luarocks command
author Kim Alvefur <zash@zash.se>
date Fri, 04 Feb 2022 19:04:32 +0100
parents 12266:24b0c4c4e28a
children 12268:d41e8c7890b0
files prosodyctl
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/prosodyctl	Fri Feb 04 19:03:02 2022 +0100
+++ b/prosodyctl	Fri Feb 04 19:04:32 2022 +0100
@@ -83,7 +83,7 @@
 		return opts.help and 0 or 1;
 	end
 	-- TODO finalize config option name
-	local server = configmanager.get("*", "plugin_server");
+	local server = opts.server or configmanager.get("*", "plugin_server");
 	if not (arg[1]:match("^https://") or lfs.attributes(arg[1]) or server) then
 		show_warning("There is no 'plugin_server' option in the configuration file");
 		-- see https://prosody.im/doc/TODO documentation