Skip to content

Commit 621c3fb

Browse files
Kaan Yaltipchila
andcommitted
Update internal/pkg/agent/cmd/upgrade.go
Co-authored-by: Paolo Chilà <[email protected]>
1 parent b1c7914 commit 621c3fb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

internal/pkg/agent/cmd/upgrade.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,13 @@ func upgradeCmdWithClient(input *upgradeInput) error {
114114
version := input.args[0]
115115
sourceURI, _ := cmd.Flags().GetString(flagSourceURI)
116116

117-
su, err := shouldUpgrade(cmd, input.agentInfo)
118-
if !su {
117+
force, err := cmd.Flags().GetBool(flagForce)
118+
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+
if err != nil {
119124
return fmt.Errorf("aborting upgrade: %w", err)
120125
}
121126

0 commit comments

Comments
 (0)