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

go install putting binaries in $GOBIN instead of $GOPATH/bin [go 1] #3431

Closed
gopherbot opened this issue Mar 29, 2012 · 2 comments
Closed

go install putting binaries in $GOBIN instead of $GOPATH/bin [go 1] #3431

gopherbot opened this issue Mar 29, 2012 · 2 comments

Comments

@gopherbot
Copy link
Contributor

by pcrosby:

What steps will reproduce the problem?

1. export GOPATH=~/code/project
2. export GOBIN=~/bin
3. write an app in ~/code/project/src/hello/app.go
4. cd ~/code/project/src/hello
5. go install

What is the expected output?

hello binary in ~/code/project/bin

What do you see instead?

hello binary in ~/bin

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g

Which operating system are you using?

mac os 10.7.3

Which version are you using?  (run 'go version')

go version go1

Please provide any additional information below.

This worked fine on the previous weekly, it broke when I upgraded to the go1 release.
@minux
Copy link
Member

minux commented Mar 29, 2012

Comment 1:

The behavior is changed in this commit:
http://code.google.com/p/go/source/detail?r=91c8264647f86484afe38660085a0e6b3109ec3a
And documented here: 
http://golang.org/cmd/go/#GOPATH_environment_variable

Status changed to WorkingAsIntended.

@rsc
Copy link
Contributor

rsc commented Mar 29, 2012

Comment 2:

It definitely changed from the last weekly to go1,
but that was intentional.  $GOBIN has global applicability now.
See http://golang.org/cmd/go/#GOPATH_environment_variable
To have binaries written to $GOPATH/bin, unset $GOBIN.

@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.
Projects
None yet
Development

No branches or pull requests

3 participants