fix: handle empty lines and comments in DOKKU_SCALE file

This commit is contained in:
Jose Diaz-Gonzalez
2021-03-22 00:24:34 -04:00
parent f63c2d18a3
commit 9d0bc930a6

View File

@@ -278,6 +278,10 @@ func readScaleFile(appName string) (map[string]int, error) {
}
for i, line := range lines {
if line == "" || strings.HasPrefix(line, "#") {
continue
}
s := strings.Split(line, "=")
if len(s) != 2 {
common.LogWarn(fmt.Sprintf("Invalid scale entry on line %d, skipping", i))