Skip to content

Commit 1828e54

Browse files
committed
Fix error message for push command
Signed-off-by: João Pereira <joao.pereira@broadcom.com>
1 parent bc24322 commit 1828e54

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

command/v7/push_command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ func (cmd PushCommand) ValidateFlags() error {
573573
case cmd.Strategy.Name != constant.DeploymentStrategyDefault && cmd.MaxInFlight != nil && *cmd.MaxInFlight < 1:
574574
return translatableerror.IncorrectUsageError{Message: "--max-in-flight must be greater than or equal to 1"}
575575
case len(cmd.InstanceSteps) > 0 && cmd.Strategy.Name != constant.DeploymentStrategyCanary:
576-
return translatableerror.ArgumentCombinationError{Args: []string{"--instance-steps", "--strategy=canary"}}
576+
return translatableerror.ArgumentCombinationError{Args: []string{"--instance-steps", "--strategy=rolling or --strategy not provided"}}
577577
case len(cmd.InstanceSteps) > 0 && !cmd.validateInstanceSteps():
578578
return translatableerror.ParseArgumentError{ArgumentName: "--instance-steps", ExpectedType: "list of weights"}
579579
}

command/v7/push_command_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1438,7 +1438,7 @@ var _ = Describe("push Command", func() {
14381438
},
14391439
translatableerror.ArgumentCombinationError{
14401440
Args: []string{
1441-
"--instance-steps", "--strategy=canary",
1441+
"--instance-steps", "--strategy=rolling or --strategy not provided",
14421442
}}),
14431443
)
14441444
})

0 commit comments

Comments
 (0)