From 0ecce904d1a20c234a76a149869a9a9a6ad35409 Mon Sep 17 00:00:00 2001 From: Florian Bergmann Date: Tue, 24 Sep 2024 14:02:52 +0200 Subject: [PATCH] Fix logic when checking overrides for LS. Before this it would print the message when the override were not enabled. --- cmd/cluster/support/status.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/cluster/support/status.go b/cmd/cluster/support/status.go index 2400ac25..31cc55f7 100644 --- a/cmd/cluster/support/status.go +++ b/cmd/cluster/support/status.go @@ -65,11 +65,11 @@ func (o *statusOptions) run() error { return err } - var clusterSupportLimited = false + var limitedSupportOverridden = false table := printer.NewTablePrinter(os.Stdout, 20, 1, 3, ' ') table.AddRow([]string{"Reason ID", "Summary", "Overridden (SUPPORTEX)", "Details"}) for _, clusterLimitedSupportReason := range clusterLimitedSupportReasons { - clusterSupportLimited = clusterSupportLimited || !clusterLimitedSupportReason.Override().Enabled() + limitedSupportOverridden = limitedSupportOverridden || clusterLimitedSupportReason.Override().Enabled() table.AddRow([]string{ clusterLimitedSupportReason.ID(), clusterLimitedSupportReason.Summary(), @@ -78,7 +78,7 @@ func (o *statusOptions) run() error { }) } // No reasons found, cluster is fully supported - if clusterSupportLimited { + if limitedSupportOverridden { fmt.Printf("No limited support reasons found or all reasons are overridden, the cluster is fully supported\n") } // Add empty row for readability