]> Cypherpunks repositories - gostls13.git/commit
cmd/go: place GOROOT/bin at the beginning of PATH in 'go generate' and 'go test'
authorBryan C. Mills <bcmills@google.com>
Wed, 4 May 2022 19:44:44 +0000 (15:44 -0400)
committerGopher Robot <gobot@golang.org>
Wed, 25 May 2022 16:40:59 +0000 (16:40 +0000)
commit78b722d8c2f764c3048c6f0344e9ebcd2687813d
treeff50505db0285190495c566a39e5e5ee4356544e
parent4e4db1e2572190bf172bcb8532047bc18571366f
cmd/go: place GOROOT/bin at the beginning of PATH in 'go generate' and 'go test'

This causes tests and generators that execute 'go' as a subprocess to
use the same go command as the parent 'go test' or 'go generate'
command.

For #51473.

Change-Id: I003cf1d05d1c93a26c6a7fdfad25e86c11765f59
Reviewed-on: https://go-review.googlesource.com/c/go/+/404134
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/go/internal/base/env.go
src/cmd/go/internal/generate/generate.go
src/cmd/go/internal/test/test.go
src/cmd/go/testdata/script/generate_goroot_PATH.txt [new file with mode: 0644]
src/cmd/go/testdata/script/test_goroot_PATH.txt [new file with mode: 0644]