Commit 7fb121aa authored by Rob Pike's avatar Rob Pike

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
parent 7917b88a
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment