From 7f045eb54f9eaed3001c36eb5aaff7e8767deab0 Mon Sep 17 00:00:00 2001 From: Pieter Loubser Date: Wed, 18 Oct 2023 14:49:44 +0100 Subject: [PATCH] (#2087) Exclude `broker server check consumer` command when using system user Here we add `broker server check consumer` to the list of cli sub commands we exclude when setting the nats user to the system user. --- cmd/broker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/broker.go b/cmd/broker.go index df7dbb737..57f8c69b6 100644 --- a/cmd/broker.go +++ b/cmd/broker.go @@ -71,7 +71,7 @@ func (b *brokerCommand) prepareNatsCli(pc *fisk.ParseContext, opts *natscli.Opti natscli.SetContext(ctx) natscli.SetVersion(build.Version) - if strings.HasPrefix(cmd, "broker server") && !util.HasPrefix(cmd, "broker server check stream", "broker server check kv", "broker server check jetstream") { + if strings.HasPrefix(cmd, "broker server") && !util.HasPrefix(cmd, "broker server check stream", "broker server check kv", "broker server check jetstream", "broker server check consumer") { if cfg.Choria.NetworkSystemUsername == "" || cfg.Choria.NetworkSystemPassword == "" { return fmt.Errorf("the %q command needs system username and password set using plugin.choria.network.system.*", cmd) }