Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dl/internal/version: add $GOROOT/bin to $PATH when running go run/generate #28103

Closed
jimmyfrasche opened this issue Oct 9, 2018 · 3 comments
Closed

Comments

@jimmyfrasche
Copy link
Member

jimmyfrasche commented Oct 9, 2018

Tools run by go run/generate sometimes need to execute the go command, for example when using go/packages.

Adding $GOROOT/bin to $PATH ensures that the appropriate version of the go/gofmt commands are run when using a go command wrapper generated by x/build/version.

edit: and test. Anything that runs go code could exec the go tool.

See #28043 for background and discussion, specifically #28043 (comment).

cc @bcmills

@gopherbot gopherbot added this to the Unreleased milestone Oct 9, 2018
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Oct 9, 2018
@dmitshur dmitshur removed the Builders x/build issues (builders, bots, dashboards) label Oct 15, 2018
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Oct 15, 2018
@dmitshur dmitshur removed the Builders x/build issues (builders, bots, dashboards) label Oct 15, 2018
@dmitshur dmitshur changed the title x/build/version: add $GOROOT/bin to $PATH when running go run/generate x/dl/internal/version: add $GOROOT/bin to $PATH when running go run/generate Oct 15, 2018
@gopherbot
Copy link

Change https://golang.org/cl/142887 mentions this issue: cmd/go/internal/generate: add Go bin path to env

@SamWhited
Copy link
Member

New CL isn't being linked for some reason, see: https://golang.org/cl/143545

@gopherbot
Copy link

Change https://golang.org/cl/143545 mentions this issue: internal/version: prefix PATH with $GOROOT/bin

@golang golang locked and limited conversation to collaborators Oct 23, 2019
@dmitshur dmitshur changed the title x/dl/internal/version: add $GOROOT/bin to $PATH when running go run/generate dl/internal/version: add $GOROOT/bin to $PATH when running go run/generate Jun 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants