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:
OpenShift Merge Robot 2021-09-07 18:48:26 +02:00 committed by GitHub
commit c9646b5126
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,14 +2,12 @@ package qemu
import (
"os"
"github.com/pkg/errors"
)
func getRuntimeDir() (string, error) {
tmpDir, ok := os.LookupEnv("TMPDIR")
if !ok {
return "", errors.New("unable to resolve TMPDIR")
tmpDir = "/tmp"
}
return tmpDir, nil
}