Skip to content

Commit

Permalink
Merge pull request #8725 from rhatdan/TMPDIR
Browse files Browse the repository at this point in the history
Allow users to specify TMPDIR in containers.conf
  • Loading branch information
openshift-merge-robot authored Dec 15, 2020
2 parents 999d40d + d5e05a4 commit 9379ee9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 0 additions & 5 deletions cmd/podman/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions cmd/podman/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9379ee9

Please sign in to comment.