Skip to content

Commit

Permalink
don't fail the build if we can't reach xeol.io
Browse files Browse the repository at this point in the history
Signed-off-by: Benji Visser <benji@093b.org>
  • Loading branch information
noqcks committed Sep 21, 2023
1 parent ec0d004 commit 8d0031e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/xeol/internal/ui/post_ui_event_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand All @@ -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")
}
Expand Down

0 comments on commit 8d0031e

Please sign in to comment.