diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-01-07 13:35:52 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-07 13:35:52 -0800 |
commit | 628b14ada7e892391fe92e88ea1e471eb6767acb (patch) | |
tree | 6a3f1d8ab33035c6096ac2e41ac0e00b3b7c4e0a /cmd | |
parent | 90b5b935a36e7034ac18c2852f768f9073a759fb (diff) | |
parent | 83ac4f8277e4076bc8c12263dd634183f7a4bfbd (diff) | |
download | podman-628b14ada7e892391fe92e88ea1e471eb6767acb.tar.gz podman-628b14ada7e892391fe92e88ea1e471eb6767acb.tar.bz2 podman-628b14ada7e892391fe92e88ea1e471eb6767acb.zip |
Merge pull request #2064 from afbjorklund/exec-env
Honor image environment variables with exec
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/exec.go | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/cmd/podman/exec.go b/cmd/podman/exec.go index 1dcb88dbd..c03834dea 100644 --- a/cmd/podman/exec.go +++ b/cmd/podman/exec.go @@ -3,7 +3,6 @@ package main import ( "fmt" "os" - "strings" "github.com/containers/libpod/cmd/podman/libpodruntime" "github.com/containers/libpod/libpod" @@ -99,15 +98,7 @@ func execCmd(c *cli.Context) error { } // ENVIRONMENT VARIABLES - env := defaultEnvVariables - for _, e := range c.StringSlice("env") { - split := strings.SplitN(e, "=", 2) - if len(split) > 1 { - env[split[0]] = split[1] - } else { - env[split[0]] = "" - } - } + env := map[string]string{} if err := readKVStrings(env, []string{}, c.StringSlice("env")); err != nil { return errors.Wrapf(err, "unable to process environment variables") |