Skip to content

Commit

Permalink
Merge pull request containers#1838 from rhatdan/tmpdir
Browse files Browse the repository at this point in the history
Set TMPDIR to /var/tmp by default
  • Loading branch information
rhatdan committed Sep 5, 2019
2 parents 34f1ae6 + ee79069 commit 4da1d5d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/buildah/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ func main() {
if buildah.InitReexec() {
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")
}
if err := rootCmd.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err)
os.Exit(1)
Expand Down

0 comments on commit 4da1d5d

Please sign in to comment.