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

dist: windows installer should update system PATH #4651

Closed
adg opened this issue Jan 12, 2013 · 9 comments
Closed

dist: windows installer should update system PATH #4651

adg opened this issue Jan 12, 2013 · 9 comments
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@adg
Copy link
Contributor

adg commented Jan 12, 2013

https://plus.google.com/115056313943520401920/posts/M6ZpwWPPz6G

Currently users are left with Go in c:\go, but they need c:\go\bin to be in the PATH.
The darwin package does this, the windows msi installer should also.
@jaywgraves
Copy link

Comment 1:

I just installed using the .msi today (new laptop at work. yay!) and I think it worked
correctly.
One other problem might be that he already had a cmd prompt open from before installing
Go and used that existing process to run the commands.  If the Go installer did, in
fact, do the right thing by adding to the PATH, you need to start a new Cmd prompt
window for it to get the updated path.

@gopherbot
Copy link
Contributor

Comment 2 by brandon.sergent:

"If the Go installer did, in fact, do the right thing by adding to the PATH, you need to
start a new Cmd prompt window for it to get the updated path."
I didn't launch the CMD window until after I had install the package.
Also, closing and restarting the command window undid the manual "set
PATH=c:\Go\bin;%PATH%" command. This might be a normal behavior of set, I have no idea.

@jaywgraves
Copy link

Comment 3:

Yes, that is the expected behavior of SET.  You need to set it at a higher level so it
will work for every new session.

@alexbrainman
Copy link
Member

Comment 4:

I see no problem.
I have downloaded 386 msi installer from
http://code.google.com/p/go/downloads/detail?name=go1.0.3.windows-386.msi&can=2&q=OpSys-Windows+Type%3DInstaller
I run it. After successfull installation, I opened cmd window and run "go env" - here is
my output:
C:\Documents and Settings\aa>go env
set GOARCH=386
set GOBIN=
set GOCHAR=8
set GOEXE=.exe
set GOGCCFLAGS=-g -O2 -m32 -mthreads
set GOHOSTARCH=386
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_386
set CGO_ENABLED=1
Everything looks as expected. The installer adds 1 GO... variable to my environment:
C:\Documents and Settings\aa>set | find "GO"
GOROOT=C:\Go\
as expected again.
My PATH environment variable has been extended too
C:\Documents and Settings\aa>echo %PATH%
...;C:\Go\bin;
with Go bin directory (as expected again).
Is it possible that your computer already had some old Go settings from previous
installations?
Alex

Status changed to WaitingForReply.

@rsc
Copy link
Contributor

rsc commented Jan 31, 2013

Comment 5:

Labels changed: added priority-later, removed priority-soon.

@shivakumargn
Copy link
Contributor

Comment 6:

The bug title suggests updating "system PATH". Instead, is updating only user specific
PATH variable might be a better option?
This way installer does not require extra privileges to install.

@jpoirier
Copy link
Member

Comment 7:

The default is the system PATH but it requires that the user performing the install have
admin privileges, if not then the install needs to be done as administrator explicitly,
e.g. hold down the Shift key and Right Mouse click then select "Run as Administrator."

@gopherbot
Copy link
Contributor

Comment 8 by visan.ovidiu:

Tested on a new VM with windows 32 bit and also i can't see any problems. The output is
the same what Alex had.

@adg
Copy link
Contributor Author

adg commented Apr 3, 2013

Comment 9:

Status changed to WorkingAsIntended.

@adg adg added workingasintended Suggested Issues that may be good for new contributors looking for work to do. labels Apr 3, 2013
@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

7 participants