summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-12-15 19:35:39 +0000
committerGitHub <noreply@github.com>2020-12-15 19:35:39 +0000
commit9379ee97907266e5a96bd9c4ae178e0e572a6f2a (patch)
tree173fcd1ccb7fc818e2c6500394cf37b865f732d1
parent999d40d2c76992cfd2d8c0827b7b0d00c4a2a661 (diff)
parentd5e05a4b92955e479b4d2bf29f8c2cfeae517861 (diff)
downloadpodman-9379ee97907266e5a96bd9c4ae178e0e572a6f2a.tar.gz
podman-9379ee97907266e5a96bd9c4ae178e0e572a6f2a.tar.bz2
podman-9379ee97907266e5a96bd9c4ae178e0e572a6f2a.zip
Merge pull request #8725 from rhatdan/TMPDIR
Allow users to specify TMPDIR in containers.conf
-rw-r--r--cmd/podman/main.go5
-rw-r--r--cmd/podman/root.go4
2 files changed, 4 insertions, 5 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index c3aaf84a8..f076d13f3 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -31,11 +31,6 @@ func main() {
return
}
- // Hard code TMPDIR functions to use /var/tmp, if user did not override
- if _, ok := os.LookupEnv("TMPDIR"); !ok {
- os.Setenv("TMPDIR", "/var/tmp")
- }
-
rootCmd = parseCommands()
Execute()
diff --git a/cmd/podman/root.go b/cmd/podman/root.go
index 0830a62a5..1f613a4c5 100644
--- a/cmd/podman/root.go
+++ b/cmd/podman/root.go
@@ -178,6 +178,10 @@ func persistentPreRunE(cmd *cobra.Command, args []string) error {
return err
}
}
+ // Hard code TMPDIR functions to use /var/tmp, if user did not override
+ if _, ok := os.LookupEnv("TMPDIR"); !ok {
+ os.Setenv("TMPDIR", "/var/tmp")
+ }
if !registry.IsRemote() {
if cmd.Flag("cpu-profile").Changed {