mirror of
https://github.com/containers/podman.git
synced 2025-05-28 21:46:51 +08:00
Allow users to set TMPDIR environment
Some users have small /var/tmp directories and need to be able to specify a different location for temporary files, which includes more space. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -600,3 +600,12 @@ func HomeDir() (string, error) {
|
||||
}
|
||||
return home, nil
|
||||
}
|
||||
|
||||
func Tmpdir() string {
|
||||
tmpdir := os.Getenv("TMPDIR")
|
||||
if tmpdir == "" {
|
||||
tmpdir = "/var/tmp"
|
||||
}
|
||||
|
||||
return tmpdir
|
||||
}
|
||||
|
Reference in New Issue
Block a user