Skip to content

Commit

Permalink
cmd/gorename: log 'go build' output on failure
Browse files Browse the repository at this point in the history
For golang/go#50043

Change-Id: I90d1e85c59d6f9c9ad30edf0180cb876c2564534
Reviewed-on: https://go-review.googlesource.com/c/tools/+/370254
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
  • Loading branch information
Bryan C. Mills committed Dec 8, 2021
1 parent cadd57e commit 3fca6a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/gorename/gorename_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ func buildGorename(t *testing.T) (tmp, bin string, cleanup func()) {
bin += ".exe"
}
cmd := exec.Command("go", "build", "-o", bin)
if err := cmd.Run(); err != nil {
t.Fatalf("Building gorename: %v", err)
if out, err := cmd.CombinedOutput(); err != nil {
t.Fatalf("Building gorename: %v\n%s", err, out)
}
return tmp, bin, func() { os.RemoveAll(tmp) }
}
Expand Down

0 comments on commit 3fca6a0

Please sign in to comment.