fix: handle empty lines and comments in DOKKU_SCALE file

This commit is contained in:
Jose Diaz-Gonzalez committed 2021-07-31 20:54:14 -04:00
1 parent f63c2d18a3
commit 9d0bc930a6
1 file changed
+4
+4
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))