Skip to content

Commit b811e50

Browse files
ecordellopenshift-cherrypick-robot
authored and
openshift-cherrypick-robot
committedJun 10, 2020
fix(copy): make tmpdir relative to current directory
/tmp may not exist in all images.
1 parent a146011 commit b811e50

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎pkg/lib/tmp/copy.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
// CopyTmpDB reads the file at the given path and copies it to a tmp directory, returning the copied file path or an err
1111
func CopyTmpDB(original string) (path string, err error) {
12-
dst, err := ioutil.TempFile("", "db-")
12+
dst, err := ioutil.TempFile(".", "db-")
1313
if err != nil {
1414
return "", err
1515
}

‎test/e2e/opm_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var (
4343
)
4444

4545
func inTemporaryBuildContext(f func() error) (rerr error) {
46-
td, err := ioutil.TempDir("", "opm-")
46+
td, err := ioutil.TempDir(".", "opm-")
4747
if err != nil {
4848
return err
4949
}

0 commit comments

Comments
 (0)
Please sign in to comment.