Browse Source

Merge pull request #2119 from SvenDowideit/2117-hardcoded-tmp-dir

use empty string so TempDir uses the OS's temp dir automatically (Closes...
Guillaume J. Charmes 11 năm trước cách đây
mục cha
commit
feabce3bcc
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      buildfile.go

+ 1 - 2
buildfile.go

@@ -458,9 +458,8 @@ func (b *buildFile) commit(id string, autoCmd []string, comment string) error {
 var lineContinuation = regexp.MustCompile(`\s*\\\s*\n`)
 
 func (b *buildFile) Build(context io.Reader) (string, error) {
-	// FIXME: @creack any reason for using /tmp instead of ""?
 	// FIXME: @creack "name" is a terrible variable name
-	name, err := ioutil.TempDir("/tmp", "docker-build")
+	name, err := ioutil.TempDir("", "docker-build")
 	if err != nil {
 		return "", err
 	}