diff options
author | Roland Shoemaker <roland@golang.org> | 2021-01-20 09:56:46 -0800 |
---|---|---|
committer | Roland Shoemaker <roland@golang.org> | 2021-01-20 09:56:46 -0800 |
commit | 79ea7a16d7e3bc36e98a4b7afd997bb315e80a1c (patch) | |
tree | 348f738736723bad4f3dbdf866e1b81d6c679dea /src/cmd/cgo/util.go | |
parent | f78276931172f6781bd448a010b547a9517abe41 (diff) | |
parent | 2117ea9737bc9cb2e30cb087b76a283f68768819 (diff) | |
download | go-79ea7a16d7e3bc36e98a4b7afd997bb315e80a1c.tar.gz go-79ea7a16d7e3bc36e98a4b7afd997bb315e80a1c.zip |
[dev.boringcrypto.go1.15] all: merge go1.15.7 into dev.boringcrypto.go1.15
Change-Id: I2d5a481ef3862f558467c6d71f46e483cc50e1fe
Diffstat (limited to 'src/cmd/cgo/util.go')
-rw-r--r-- | src/cmd/cgo/util.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/cgo/util.go b/src/cmd/cgo/util.go index 921306b7aa..00d931b98a 100644 --- a/src/cmd/cgo/util.go +++ b/src/cmd/cgo/util.go @@ -8,9 +8,9 @@ import ( "bytes" "fmt" "go/token" + exec "internal/execabs" "io/ioutil" "os" - "os/exec" ) // run runs the command argv, feeding in stdin on standard input. @@ -63,7 +63,7 @@ func run(stdin []byte, argv []string) (stdout, stderr []byte, ok bool) { p.Env = append(os.Environ(), "TERM=dumb") err := p.Run() if _, ok := err.(*exec.ExitError); err != nil && !ok { - fatalf("%s", err) + fatalf("exec %s: %s", argv[0], err) } ok = p.ProcessState.Success() stdout, stderr = bout.Bytes(), berr.Bytes() @@ -88,7 +88,7 @@ func fatalf(msg string, args ...interface{}) { // If we've already printed other errors, they might have // caused the fatal condition. Assume they're enough. if nerrors == 0 { - fmt.Fprintf(os.Stderr, msg+"\n", args...) + fmt.Fprintf(os.Stderr, "cgo: "+msg+"\n", args...) } os.Exit(2) } |