diff --git a/ee/debug/checkups/checkups.go b/ee/debug/checkups/checkups.go index beff7a444..3232cdc9f 100644 --- a/ee/debug/checkups/checkups.go +++ b/ee/debug/checkups/checkups.go @@ -46,23 +46,6 @@ const ( Failing Status = "Failing" // Checkup is failing ) -func (s Status) Emoji() string { - switch s { - case Informational: - return " " - case Passing: - return "✅" - case Warning: - return "⚠️" - case Failing: - return "❌" - case Erroring: - return "❌" - default: - return "? " - } -} - func writeSummary(w io.Writer, s Status, name, msg string) { fmt.Fprintf(w, "%s\t%s: %s\n", s.Emoji(), name, msg) } diff --git a/ee/debug/checkups/checkups_other.go b/ee/debug/checkups/checkups_other.go new file mode 100644 index 000000000..bb006e83b --- /dev/null +++ b/ee/debug/checkups/checkups_other.go @@ -0,0 +1,21 @@ +//go:build !windows +// +build !windows + +package checkups + +func (s Status) Emoji() string { + switch s { + case Informational: + return " " + case Passing: + return "✅" + case Warning: + return "⚠️" + case Failing: + return "❌" + case Erroring: + return "❌" + default: + return "? " + } +} diff --git a/ee/debug/checkups/checkups_windows.go b/ee/debug/checkups/checkups_windows.go new file mode 100644 index 000000000..a5da2b397 --- /dev/null +++ b/ee/debug/checkups/checkups_windows.go @@ -0,0 +1,23 @@ +//go:build windows +// +build windows + +package checkups + +// Emoji returns the Windows-friendly symbol for the given status. Powershell will not +// display actual emojis. +func (s Status) Emoji() string { + switch s { + case Informational: + return " " + case Passing: + return "OK " + case Warning: + return "! " + case Failing: + return "X " + case Erroring: + return "X " + default: + return "? " + } +}