From 9d0bc930a67a9972622deaf793c2d8fde7abe31a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 22 Mar 2021 00:24:34 -0400 Subject: [PATCH] fix: handle empty lines and comments in DOKKU_SCALE file --- plugins/ps/functions.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/ps/functions.go b/plugins/ps/functions.go index f6a47bbe8..a03632466 100644 --- a/plugins/ps/functions.go +++ b/plugins/ps/functions.go @@ -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))