github.com/quay/claircore@v1.5.28/libindex/tempdir_unix.go (about) 1 package libindex 2 3 import ( 4 "os" 5 ) 6 7 // FixTemp modifies "dir" according to the documented defaults. 8 // 9 // See [NewRemoteFetchArena]. 10 func fixTemp(dir string) string { 11 if dir != "" { 12 return dir 13 } 14 if d, ok := os.LookupEnv("TMPDIR"); ok && d != "" { 15 return d 16 } 17 return "/var/tmp" 18 }