diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-11-17 11:42:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-17 11:42:39 +0100 |
commit | bd6fbb190ba701ff77c084a36b05e64ba9884a78 (patch) | |
tree | d03e80d102c943c606b31087d194bdedd5ba62da /cmd/podman | |
parent | 802f26ef1039ea3a95c54fce53ea2ed99822e1c3 (diff) | |
parent | 364b242b70d9593e782a3d099bfc4ba04d8b3a2d (diff) | |
download | podman-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/podman')
-rw-r--r-- | cmd/podman/root.go | 14 |
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 { |