From 8d0031eb1887380af9e314c86ca96633c73f664a Mon Sep 17 00:00:00 2001 From: Benji Visser Date: Wed, 20 Sep 2023 19:46:20 -0700 Subject: [PATCH] don't fail the build if we can't reach xeol.io Signed-off-by: Benji Visser --- cmd/xeol/internal/ui/post_ui_event_writer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/xeol/internal/ui/post_ui_event_writer.go b/cmd/xeol/internal/ui/post_ui_event_writer.go index 04e1401e..6f0e6dd1 100644 --- a/cmd/xeol/internal/ui/post_ui_event_writer.go +++ b/cmd/xeol/internal/ui/post_ui_event_writer.go @@ -152,7 +152,7 @@ func writeNotaryPolicyEvaluationMessage(writer io.Writer, events ...partybus.Eve nt.Action, nt.Type, nt.ImageReference)) } } - if _, err := fmt.Fprintln(writer, notice); err != nil { + if _, err := fmt.Fprint(writer, strings.TrimSpace(notice)); err != nil { // don't let this be fatal log.WithFields("error", err).Warn("failed to write app update notification") } @@ -178,7 +178,7 @@ func writeEolPolicyEvaluationMessage(writer io.Writer, events ...partybus.Event) notice = lipgloss.NewStyle().Foreground(terminalYellow).Italic(true).Render(fmt.Sprintf("[%s][%s] Policy Violation: %s (v%s) needs to be upgraded to a newer version.\n", pt.Action, pt.Type, pt.ProductName, pt.Cycle)) } } - if _, err := fmt.Fprintln(writer, notice); err != nil { + if _, err := fmt.Fprint(writer, strings.TrimSpace(notice)); err != nil { // don't let this be fatal log.WithFields("error", err).Warn("failed to write app update notification") }