diff options
author | Jason T. Greene <jason.greene@redhat.com> | 2022-01-19 11:28:09 -0600 |
---|---|---|
committer | Jason T. Greene <jason.greene@redhat.com> | 2022-01-19 12:05:04 -0600 |
commit | 4693fc6db14e00db7f1af0b02fad15da35fb3799 (patch) | |
tree | 459b8300737e31c7bc991bed0a360a23c73cb6a4 /pkg/env/env_unix.go | |
parent | 1c81b67341300853d7fe9b6568b247e579c34969 (diff) | |
download | podman-4693fc6db14e00db7f1af0b02fad15da35fb3799.tar.gz podman-4693fc6db14e00db7f1af0b02fad15da35fb3799.tar.bz2 podman-4693fc6db14e00db7f1af0b02fad15da35fb3799.zip |
Implement env parsing on Windows
Fixes #12056
Also, enables existing parsing logic for all Unix derived OSs
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
Diffstat (limited to 'pkg/env/env_unix.go')
-rw-r--r-- | pkg/env/env_unix.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkg/env/env_unix.go b/pkg/env/env_unix.go new file mode 100644 index 000000000..16061a700 --- /dev/null +++ b/pkg/env/env_unix.go @@ -0,0 +1,15 @@ +// +build !windows + +package env + +// ParseSlice parses the specified slice and transforms it into an environment +// map. +func ParseSlice(s []string) (map[string]string, error) { + env := make(map[string]string, len(s)) + for _, e := range s { + if err := parseEnv(env, e); err != nil { + return nil, err + } + } + return env, nil +} |