]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/doc: fix GOROOT skew and path joining bugs
authorMichael Matloob <matloob@golang.org>
Tue, 1 Jul 2025 21:16:53 +0000 (17:16 -0400)
committerMichael Matloob <matloob@google.com>
Mon, 7 Jul 2025 20:13:37 +0000 (13:13 -0700)
commitef46e1b164e4a530c278434a9aaa2b23ce9a9d12
treecc8e5fd8a81522909f8abfead6929e0dd2b0c9a0
parent75b43f9a97ada1f0fce7a5775d4ab373bd0dad9c
cmd/internal/doc: fix GOROOT skew and path joining bugs

Use the goCmd() function to get the go command to invoke, so that when
GOROOT is set, the go command that's invoked uses the same GOROOT.
Otherwise there will be skew between the go command and the tools and
runtime. Also use the environment when determining GOPROXY and
GOMODCACHE, and use url.Join so the slashes in 'http://' aren't
collapsed into one.

Change-Id: Ie36ca2fffdb015a7f5f9bd7f514850e41fad2c1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/685319
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/internal/doc/main.go