Don't hide line parsing errors

This commit is contained in:
Martin Milata
2016-12-12 14:43:30 +01:00
parent 0ff0c0fc7a
commit 861984c215
3 changed files with 15 additions and 3 deletions

View File

@ -149,11 +149,13 @@ func readFile(filename string) (envMap map[string]string, err error) {
for _, fullLine := range lines {
if !isIgnoredLine(fullLine) {
key, value, err := parseLine(fullLine)
var key, value string
key, value, err = parseLine(fullLine)
if err == nil {
envMap[key] = value
if err != nil {
return
}
envMap[key] = value
}
}
return