From 822d5a486a363eda8fb60478500c028e8bad6799 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Tue, 3 Mar 2020 13:24:55 -0600 Subject: avoid adding to nil map we need to make the environment map to avoid throwing an error when trying to add an environment value from file. Signed-off-by: Brent Baude --- pkg/env/env.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/env/env.go b/pkg/env/env.go index 31ffab03c..9c0ee79db 100644 --- a/pkg/env/env.go +++ b/pkg/env/env.go @@ -62,7 +62,8 @@ func Join(base map[string]string, override map[string]string) map[string]string // ParseFile parses the specified path for environment variables and returns them // as a map. -func ParseFile(path string) (env map[string]string, err error) { +func ParseFile(path string) (_ map[string]string, err error) { + env := make(map[string]string) defer func() { if err != nil { err = errors.Wrapf(err, "error parsing env file %q", path) -- cgit v1.2.3-54-g00ecf