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

GOPATH can have multiple : separated paths in it. #386

Closed
wants to merge 1 commit into from
Closed

GOPATH can have multiple : separated paths in it. #386

wants to merge 1 commit into from

Conversation

gotyaoi
Copy link
Contributor

@gotyaoi gotyaoi commented Nov 20, 2015

Couldn't find an easy way to do this in make language. Pretty sure this is sh compatible.

@gotyaoi
Copy link
Contributor Author

gotyaoi commented Nov 20, 2015

Ah, forgot to mention: the reason that I personally run into this is that I sometimes need to run with

GOPATH=`godep path\`:$GOPATH

from the godep docs, as some parts of my IDE are not as smart as they should be yet. This will also come up for people who use multiple paths to separate personal code from internet code.

@gotyaoi gotyaoi changed the title GOPATH can have multiple : sperated paths in it. GOPATH can have multiple : separated paths in it. Nov 20, 2015
@sparrc
Copy link
Contributor

sparrc commented Nov 25, 2015

@gotyaoi We could also just require that GOBIN is part of the users PATH to use the makefile.

That way we could just remove all of the GOBIN references and simply execute godep directly

@gotyaoi
Copy link
Contributor Author

gotyaoi commented Nov 25, 2015

Possibly. Another possibility would be to add all possible GOBIN directories to the front of the PATH in the makefile. I'll try that out tonight.

This means that simply adding /bin to the end is not enough. Instead of
setting GOBIN, this version prepends things to the PATH. If GOBIN is
already set, simply prepends GOBIN to PATH.  If not, appends /bin to
each component of GOPATH, then prepends that to PATH.
@gotyaoi
Copy link
Contributor Author

gotyaoi commented Nov 25, 2015

@sparrc How does that look?

@sparrc sparrc closed this in 40fd33d Nov 26, 2015
@sparrc
Copy link
Contributor

sparrc commented Nov 26, 2015

looks good, thanks @gotyaoi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants