You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seen on go1.5.2 linux/amd64, running a program using io.ioutil.TempDir() inside a docker image that has neither TMPDIR defined nor /tmp created.
Calling io.ioutil.TempDir() fails with: mkdir ... no such file or directory.
In the special case where TempDir (or TempFile) are called with an empty first argument, it feels like we could try to mkdir the directory before erroring out of the function.
Small repro case:
$ cat test1.go
package main
import (
"io/ioutil"
)
func main() {
_, err := ioutil.TempDir("", "blah")
if err != nil {
println(err.Error())
}
}
$ go build test1.go
$ mkdir dir
$ mv test1 dir
$ sudo chroot ./dir /test1
mkdir /tmp/blah629598329: no such file or directory
$