Return bufio error if set in ParseEnvFile

Return an error value if bufio failed to properly read a token.
Avoids running a container with partial environment.

Fixes: #14266

Signed-off-by: Matthieu Hauglustaine <matt.hauglustaine@gmail.com>
Upstream-commit: 0ede41afbd
Component: cli
This commit is contained in:
Matthieu Hauglustaine
2017-05-15 11:57:14 +02:00
committed by Vincent Demeester
parent e5cf261e6a
commit cdb5492521
+1 -1
View File
@@ -40,7 +40,7 @@ func ParseEnvFile(filename string) ([]string, error) {
}
}
}
return lines, nil
return lines, scanner.Err()
}
var whiteSpaces = " \t"