summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-01-07 13:35:52 -0800
committerGitHub <noreply@github.com>2019-01-07 13:35:52 -0800
commit628b14ada7e892391fe92e88ea1e471eb6767acb (patch)
tree6a3f1d8ab33035c6096ac2e41ac0e00b3b7c4e0a
parent90b5b935a36e7034ac18c2852f768f9073a759fb (diff)
parent83ac4f8277e4076bc8c12263dd634183f7a4bfbd (diff)
downloadpodman-628b14ada7e892391fe92e88ea1e471eb6767acb.tar.gz
podman-628b14ada7e892391fe92e88ea1e471eb6767acb.tar.bz2
podman-628b14ada7e892391fe92e88ea1e471eb6767acb.zip
Merge pull request #2064 from afbjorklund/exec-env
Honor image environment variables with exec
-rw-r--r--cmd/podman/exec.go11
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")