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
doc: mention how to add GOPATH\bin to PATH for Windows users #18583
Comments
We need to stop adding stuff to Go 1.8. Let's target Go 1.9. |
The Windows installer does this automatically, so maybe this isn't required? See: https://golang.org/doc/install?download=go1.8.3.windows-amd64.msi Screen capture of the page at 7 June 2017: |
@a-h Maybe I'm mistaken, but |
Yes, you're right. On Windows For Windows, I checked what happens if you install Go 1.10.2 on a new Windows Server 2016 VM running in AWS. I can see that So, for Windows, no documentation improvement is probably needed, I don't know whether the installation process for Linux or MacOS include this helpful step though. |
Very strange, for me that Path was not added it seems @a-h I have two points of measurement, one from a few months back, so that might not be accurate anymore. But I also installed go very recently on a new machine, with no %GOPATH%\bin in fact. |
Just ran the MSI install of Go 1.10.3 on a clean Win10 VM. Although The result of this is that If someone could kindly point me towards where the script that builds the MSI file is located, I'd be happy to take a look. |
I think you want $GOPATH/src/golang.org/x/build/cmd/release/releaselet.go Alex |
Thanks @alexbrainman that is it. Specifically, this line: https://github.com/golang/build/blob/master/cmd/release/releaselet.go#L732 By changing that line from this
to this instead
then the MSI installer modifies the Otherwise, the user must open the "Control Panel -> Edit environment variables for your account" from the "Start" menu and click on the "OK" button in the dialog. Once this has been done, the user can open a new command window, and the path will be set correctly. The above is via http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Setting-environment-variable-PATH-tp2418484p5264135.html |
Change https://golang.org/cl/127777 mentions this issue: |
Done. Please, review my change https://go-review.googlesource.com/c/build/+/127777. Alex |
The GOPATH section now mentions adding |
CL 104115 added %GOPATH%\bin to the PATH. But GOPATH environment variable might contain directory list. So, if, for example, GOPATH has "c:\a;c:\b", then PATH is end up with "c:\a;c:\b\bin" - which is wrong - user, probably, wants both c:\a\bin and c:\b\bin to be listed in his/her PATH. Use %USERPROFILE%\go\bin instead, because USERPROFILE always has directory. If user wants to change GOPATH, they would have to adjust their PATH manually. Updates golang/go#18583 Change-Id: I634a25ace28776c978faebcfcb2c1750d6d17a0d Reviewed-on: https://go-review.googlesource.com/c/127777 Reviewed-by: Ron Evans <ron@hybridgroup.com> Reviewed-by: Mario Arranz <marioarranzr@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
GOPATH variable section is not mentioning that GOPATH\bin needs to be added to PATH for convince. Create a wiki page with platform specific instructions how to add the bin directory to the PATH and add instructions for Windows.
The text was updated successfully, but these errors were encountered: