Skip to content

Commit a993f17

Browse files
committed
Fix unable to create dest file/invalid cross-device link
Fixes #15
1 parent 13188ef commit a993f17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

template.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func generateFile(config Config, containers []*RuntimeContainer) bool {
8787

8888
dest := os.Stdout
8989
if config.Dest != "" {
90-
dest, err = ioutil.TempFile("", "docker-gen")
90+
dest, err = ioutil.TempFile(filepath.Dir(config.Dest), "docker-gen")
9191
defer func() {
9292
dest.Close()
9393
os.Remove(dest.Name())

0 commit comments

Comments
 (0)