summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-03-03 13:24:55 -0600
committerBrent Baude <bbaude@redhat.com>2020-03-03 17:00:50 -0600
commit822d5a486a363eda8fb60478500c028e8bad6799 (patch)
treeea75744fe1060542725a627c72c5c32ab4299b19
parent3bc5f431d4df9724501a42a68e333f7e98a0b0cf (diff)
downloadpodman-822d5a486a363eda8fb60478500c028e8bad6799.tar.gz
podman-822d5a486a363eda8fb60478500c028e8bad6799.tar.bz2
podman-822d5a486a363eda8fb60478500c028e8bad6799.zip
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 <bbaude@redhat.com>
-rw-r--r--pkg/env/env.go3
1 files changed, 2 insertions, 1 deletions
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)