From d77f39974b926064a6ad8481c982cd367b2690b5 Mon Sep 17 00:00:00 2001 From: Ivan Milchev Date: Wed, 30 Oct 2024 12:04:01 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20report=20errors=20when=20status?= =?UTF-8?q?=20command=20fails=20to=20auth?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ivan Milchev --- apps/cnquery/cmd/status.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/cnquery/cmd/status.go b/apps/cnquery/cmd/status.go index 3c20d6bbcb..8638254359 100644 --- a/apps/cnquery/cmd/status.go +++ b/apps/cnquery/cmd/status.go @@ -225,7 +225,7 @@ func (s Status) RenderCliStatus() { if s.Client.Registered && s.Client.PingPongError == nil { log.Info().Msg(theme.DefaultTheme.Success("client authenticated successfully")) - } else if s.Client.PingPongError == nil { + } else if s.Client.PingPongError != nil { log.Error().Err(s.Client.PingPongError). Msgf("The Mondoo Platform credentials provided at %s didn't successfully authenticate with Mondoo Platform. Please re-authenticate with Mondoo Platform. To learn how, read https://mondoo.com/docs/cnspec/cnspec-adv-install/registration/.", viper.ConfigFileUsed())