From 0ede41afbd9bcff16fe81b71de96f9c5c863722b Mon Sep 17 00:00:00 2001 From: Matthieu Hauglustaine Date: Wed, 1 Jul 2015 16:54:20 +0200 Subject: [PATCH] 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 --- opts/envfile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opts/envfile.go b/opts/envfile.go index 19ee8955f9..74d7f96f34 100644 --- a/opts/envfile.go +++ b/opts/envfile.go @@ -40,7 +40,7 @@ func ParseEnvFile(filename string) ([]string, error) { } } } - return lines, nil + return lines, scanner.Err() } var whiteSpaces = " \t"