cmd/go: improve 'missing $GOPATH' error message when HOME is unset #29341
With reference to #24064, this is a common occurrence when trying to automate the installation of Go programs with tools such as Puppet. System commands are run in an initially empty environment, so a command like:
fails with this error:
But this works fine in a 'normal' interactive environment, because GOPATH is inferred from the value of $HOME. What's missing here is not $GOPATH, per se, but $HOME.
Maybe this error message could be improved, along the lines of: