From cdb5492521732be18265357cac23c35a0c65af88 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 Upstream-commit: 0ede41afbd9bcff16fe81b71de96f9c5c863722b Component: cli --- components/cli/opts/envfile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/cli/opts/envfile.go b/components/cli/opts/envfile.go index 19ee8955f9..74d7f96f34 100644 --- a/components/cli/opts/envfile.go +++ b/components/cli/opts/envfile.go @@ -40,7 +40,7 @@ func ParseEnvFile(filename string) ([]string, error) { } } } - return lines, nil + return lines, scanner.Err() } var whiteSpaces = " \t"