Skip to content

Commit

Permalink
Removed error checking - will add back after more updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Petersen committed Aug 21, 2020
1 parent 49c7a26 commit ad39a84
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions pkg/kn/commands/service/configuration_edit_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,7 @@ func (p *ConfigurationEditFlags) Apply(
return fmt.Errorf("only --scale or --scale-min can be specified")
} else {
if !strings.Contains(p.Scale, "..") {
scaleMin, err := strconv.Atoi(p.Scale)
if err != nil {
return err
}
scaleMin, _ := strconv.Atoi(p.Scale)
scaleMax := scaleMin
err = servinglib.UpdateMaxScale(template, scaleMax)
if err != nil {
Expand All @@ -350,14 +347,8 @@ func (p *ConfigurationEditFlags) Apply(
}
} else {
scaleParts := strings.Split(p.Scale, "..")
scaleMin, err := strconv.Atoi(scaleParts[0])
if err != nil {
return err
}
scaleMax, err := strconv.Atoi(scaleParts[1])
if err != nil {
return err
}
scaleMin, _ := strconv.Atoi(scaleParts[0])
scaleMax, _ := strconv.Atoi(scaleParts[1])
if scaleMax > 0 {
err = servinglib.UpdateMaxScale(template, scaleMax)
if err != nil {
Expand Down

0 comments on commit ad39a84

Please sign in to comment.