summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-17 11:42:39 +0100
committerGitHub <noreply@github.com>2021-11-17 11:42:39 +0100
commitbd6fbb190ba701ff77c084a36b05e64ba9884a78 (patch)
treed03e80d102c943c606b31087d194bdedd5ba62da /cmd
parent802f26ef1039ea3a95c54fce53ea2ed99822e1c3 (diff)
parent364b242b70d9593e782a3d099bfc4ba04d8b3a2d (diff)
downloadpodman-bd6fbb190ba701ff77c084a36b05e64ba9884a78.tar.gz
podman-bd6fbb190ba701ff77c084a36b05e64ba9884a78.tar.bz2
podman-bd6fbb190ba701ff77c084a36b05e64ba9884a78.zip
Merge pull request #12303 from rhatdan/tmpdir
Set config environment variables early in Podman init
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/root.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/cmd/podman/root.go b/cmd/podman/root.go
index 418a70e1e..9e4c8d24d 100644
--- a/cmd/podman/root.go
+++ b/cmd/podman/root.go
@@ -163,20 +163,6 @@ func persistentPreRunE(cmd *cobra.Command, args []string) error {
return err
}
- for _, env := range cfg.Engine.Env {
- splitEnv := strings.SplitN(env, "=", 2)
- if len(splitEnv) != 2 {
- return fmt.Errorf("invalid environment variable for engine %s, valid configuration is KEY=value pair", env)
- }
- // skip if the env is already defined
- if _, ok := os.LookupEnv(splitEnv[0]); ok {
- logrus.Debugf("environment variable %s is already defined, skip the settings from containers.conf", splitEnv[0])
- continue
- }
- if err := os.Setenv(splitEnv[0], splitEnv[1]); err != nil {
- return err
- }
- }
// Hard code TMPDIR functions to use /var/tmp, if user did not override
if _, ok := os.LookupEnv("TMPDIR"); !ok {
if tmpdir, err := cfg.ImageCopyTmpDir(); err != nil {