cmd/dist: when using GOROOT_FINAL, require GOROOT to be explicitly provided #51504
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Based on my current understanding, I think we should make it a fatal error if the GOROOT_FINAL environment variable is set to a non-empty string, but the GOROOT environment variable is unset or set to an empty string. Doing this should reduce the costs of maintaining and developing Go, without negatively affecting utility.
That is, if GOROOT_FINAL needs to be set (rare), it isn't unreasonable to require GOROOT to also be set explicitly in order to avoid possible ambiguity that arises if it isn't set.
This is a follow up from #50893 (comment).
Issue #42563 might be relevant here, in that this requires knowing the explicit environment the user provided while calling make.bash, and not get confused if make.bash itself sets GOROOT.
The text was updated successfully, but these errors were encountered: