We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af10607 commit 8a76882Copy full SHA for 8a76882
internal/pkg/agent/cmd/upgrade.go
@@ -114,8 +114,13 @@ func upgradeCmdWithClient(input *upgradeInput) error {
114
version := input.args[0]
115
sourceURI, _ := cmd.Flags().GetString(flagSourceURI)
116
117
- su, err := shouldUpgrade(cmd, input.agentInfo)
118
- if !su {
+ force, err := cmd.Flags().GetBool(flagForce)
+ if err != nil {
119
+ return fmt.Errorf("failed to retrieve command flag information while trying to upgrade the agent: %w", err)
120
+ }
121
+
122
+ err := checkUpgradable(force, input.agentInfo)
123
124
return fmt.Errorf("aborting upgrade: %w", err)
125
}
126
0 commit comments