mirror of
https://github.com/containers/podman.git
synced 2025-06-21 09:28:09 +08:00
Merge pull request #11437 from MichaelAnckaert/fix-11418
[NO TESTS NEEDED] Fix #11418 - Default TMPDIR to /tmp on OS X
This commit is contained in:
@ -2,14 +2,12 @@ package qemu
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func getRuntimeDir() (string, error) {
|
func getRuntimeDir() (string, error) {
|
||||||
tmpDir, ok := os.LookupEnv("TMPDIR")
|
tmpDir, ok := os.LookupEnv("TMPDIR")
|
||||||
if !ok {
|
if !ok {
|
||||||
return "", errors.New("unable to resolve TMPDIR")
|
tmpDir = "/tmp"
|
||||||
}
|
}
|
||||||
return tmpDir, nil
|
return tmpDir, nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user