2
0

Fix handling of service files with invalid syntax

This commit is contained in:
Frode Austvik
2020-07-13 17:03:49 +00:00
committed by Jack Christensen
parent 3430c5407d
commit 2b9c44734f
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ func ParseServicefile(r io.Reader) (*Servicefile, error) {
} else {
parts := strings.SplitN(line, "=", 2)
if len(parts) != 2 {
fmt.Errorf("unable to parse line %d", lineNum)
return nil, fmt.Errorf("unable to parse line %d", lineNum)
}
key := strings.TrimSpace(parts[0])