diff --git a/cli/internal/cmd/upgradeapply.go b/cli/internal/cmd/upgradeapply.go index 415a4e2d9..7451480d3 100644 --- a/cli/internal/cmd/upgradeapply.go +++ b/cli/internal/cmd/upgradeapply.go @@ -345,9 +345,13 @@ func (u *upgradeApplyCmd) upgradeAttestConfigIfDiff(cmd *cobra.Command, newConfi return fmt.Errorf("getting cluster attestation config: %w", err) } // If the current config is equal, or there is an error when comparing the configs, we skip the upgrade. - if equal, err := newConfig.EqualTo(clusterAttestationConfig); err != nil || equal { + equal, err := newConfig.EqualTo(clusterAttestationConfig) + if err != nil { return fmt.Errorf("comparing attestation configs: %w", err) } + if equal { + return nil + } if !flags.yes { ok, err := askToConfirm(cmd, "You are about to change your cluster's attestation config. Are you sure you want to continue?")