feat: return an error when an invalid scale count is encountered
Closes #5710
This commit is contained in:
@@ -394,7 +394,10 @@ func ParseScaleOutput(b []byte) (map[string]int, error) {
|
||||
scale := make(map[string]int)
|
||||
|
||||
for _, line := range strings.Split(string(b), "\n") {
|
||||
s := strings.Split(line, "=")
|
||||
s := strings.SplitN(line, "=", 2)
|
||||
if len(s) != 2 {
|
||||
return scale, fmt.Errorf("invalid scale output stored by dokku: %v", line)
|
||||
}
|
||||
processType := s[0]
|
||||
count, err := strconv.Atoi(s[1])
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user