]> Cypherpunks.ru repositories - gostls13.git/commit
misc/cgo: invoke "go" from $GOROOT/bin instead of $PATH
authorBryan C. Mills <bcmills@google.com>
Thu, 19 May 2022 14:26:53 +0000 (10:26 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 19 May 2022 15:04:11 +0000 (15:04 +0000)
commit9bc544a1580a67166060aabc5af91227092f6a39
tree3b49789bb2716358d2956ac5f41860dfd05e759b
parentb93ceefa7b47167f7bc9ec471905c136b234d34f
misc/cgo: invoke "go" from $GOROOT/bin instead of $PATH

If PATH doesn't contain GOROOT/bin as the first element, this could
otherwise end up running entirely the wrong command (and from the
wrong GOROOT, even).

I pre-tested this change on release-branch.go1.17 using a gomote.
I believe that it will fix the test failure on that branch,
but will need to be backported.

For #52995.

Change-Id: Ib0c43289a1e0ccf9409f0f0ef8046501a955ce65
Reviewed-on: https://go-review.googlesource.com/c/go/+/407294
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
misc/cgo/testplugin/plugin_test.go
misc/cgo/testshared/shared_test.go