1
0
mirror of https://github.com/golang/go synced 2024-11-17 22:14:43 -07:00

cmd/dist: more informative error for mkdtemp failing

The Darwin builders are all failing here but strerror doesn't provide context.

R=golang-dev, bradfitz, adg
CC=golang-dev
https://golang.org/cl/13095043
This commit is contained in:
Rob Pike 2013-08-19 08:29:43 +10:00
parent 7917b88a06
commit 7fb121aa47

5
src/cmd/dist/unix.c vendored
View File

@ -467,8 +467,9 @@ xworkdir(void)
if(b.len == 0)
bwritestr(&b, "/var/tmp");
bwritestr(&b, "/go-cbuild-XXXXXX");
if(mkdtemp(bstr(&b)) == nil)
fatal("mkdtemp: %s", strerror(errno));
p = bstr(&b);
if(mkdtemp(p) == nil)
fatal("mkdtemp(%s): %s", p, strerror(errno));
p = btake(&b);
bfree(&b);