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: e8484940170e81eef1866f55f79030731e3d3d69
Component: engine
This commit is contained in:
Matthieu Hauglustaine
2015-07-01 16:54:20 +02:00
parent 67a917ff70
commit e7ca24491b

View File

@ -40,7 +40,7 @@ func ParseEnvFile(filename string) ([]string, error) {
}
}
}
return lines, nil
return lines, scanner.Err()
}
var whiteSpaces = " \t"