diff --git a/cmd/root/root.go b/cmd/root/root.go index 3b37d0176..4d0d42562 100644 --- a/cmd/root/root.go +++ b/cmd/root/root.go @@ -114,10 +114,15 @@ func Execute(ctx context.Context, cmd *cobra.Command) error { if err == nil { logger.Info("completed execution", slog.String("exit_code", "0")) + } else if errors.Is(err, ErrAlreadyPrinted) { + logger.Debug("failed execution", + slog.String("exit_code", "1"), + ) } else { logger.Error("failed execution", slog.String("exit_code", "1"), - slog.String("error", err.Error())) + slog.String("error", err.Error()), + ) } }