mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-02-22 16:00:05 -05:00
cli: allow upgrade to succeed if desired attestation config == actual config (#2094)
This commit is contained in:
parent
ef404b5839
commit
37af5f5f50
@ -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?")
|
||||
|
Loading…
x
Reference in New Issue
Block a user