Skip to content

Commit 5d94cc4

Browse files
committedJun 9, 2020
fix(copy): make tmpdir relative to current directory
/tmp may not exist in all images.
1 parent b8292cc commit 5d94cc4

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
@@ -47,7 +47,7 @@ var (
4747
)
4848

4949
func inTemporaryBuildContext(f func() error) (rerr error) {
50-
td, err := ioutil.TempDir("", "opm-")
50+
td, err := ioutil.TempDir(".", "opm-")
5151
if err != nil {
5252
return err
5353
}

0 commit comments

Comments
 (0)
Please sign in to comment.