From 2e04fcd71834fa6ac3f2d95ecc33c5ea875746f8 Mon Sep 17 00:00:00 2001 From: ben-toogood Date: Mon, 13 Jul 2020 12:52:54 +0100 Subject: [PATCH] config/cmd: don't fatally error if auth account cannot be generated (#1824) --- config/cmd/cmd.go | 4 +++- util/auth/auth.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/cmd/cmd.go b/config/cmd/cmd.go index 988ab2b0..a93abf09 100644 --- a/config/cmd/cmd.go +++ b/config/cmd/cmd.go @@ -668,7 +668,9 @@ func (c *cmd) Before(ctx *cli.Context) error { // verify the auth's service account if err := authutil.Verify(*c.opts.Auth); err != nil { - logger.Fatalf("Error generating auth account: %v", err) + if logger.V(logger.DebugLevel, logger.DefaultLogger) { + logger.Debugf("Auth [%v] Error generating auth account: %v", (*c.opts.Auth), err) + } } // Setup broker options. diff --git a/util/auth/auth.go b/util/auth/auth.go index ccc6cbff..454a2d61 100644 --- a/util/auth/auth.go +++ b/util/auth/auth.go @@ -25,7 +25,9 @@ func Verify(a auth.Auth) error { if err != nil { return err } - logger.Debugf("Auth [%v] Generated an auth account", a.String()) + if logger.V(logger.DebugLevel, logger.DefaultLogger) { + logger.Debugf("Auth [%v] Generated an auth account", a.String()) + } accID = acc.ID accSecret = acc.Secret