summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-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 {