From 367d4f855d39f2e36e2619ee9d84227eb4f657cc Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 3 Jul 2024 18:15:17 +0200 Subject: [PATCH] Fix logic error in #1532 --- cmd/root/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/root/root.go b/cmd/root/root.go index 91e91d368c..61baa4da0f 100644 --- a/cmd/root/root.go +++ b/cmd/root/root.go @@ -98,7 +98,7 @@ func Execute(cmd *cobra.Command) { // Run the command cmd, err := cmd.ExecuteContextC(ctx) - if err != nil && errors.Is(err, ErrAlreadyPrinted) { + if err != nil && !errors.Is(err, ErrAlreadyPrinted) { // If cmdio logger initialization succeeds, then this function logs with the // initialized cmdio logger, otherwise with the default cmdio logger cmdio.LogError(cmd.Context(), err)