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 doesn't work if have /usr/bin/go #279

Open
atomita opened this issue Dec 20, 2022 · 5 comments
Open

go doesn't work if have /usr/bin/go #279

atomita opened this issue Dec 20, 2022 · 5 comments

Comments

@atomita
Copy link

atomita commented Dec 20, 2022

#247 moved the shims directory to the end of the PATH, so go doesn't work if have /usr/bin/go.

# the shims directory to the end of the PATH
which go
/usr/bin/go
# the shims directory to the start of the PATH
which go
~/.anyenv/envs/goenv/shims/go
@stevegt
Copy link
Contributor

stevegt commented Feb 3, 2023

@atomita I stopped installing /usr/bin/go on any build machine when I started using goenv years ago -- too many opportunities for confusion if it's left in place. Removing your system Go would be my recommendation. Is there a reason that can't be done on your platform?

@ChronosMasterOfAllTime
Copy link
Collaborator

Maybe goenv should check if there is a "system" version and warn about the behavioral PATH collision?

@stevegt
Copy link
Contributor

stevegt commented Mar 8, 2023

Future folks who find this thread -- please see #247 (comment).

@ChronosMasterOfAllTime That may not be a bad idea -- I don't have the bandwidth to think through if or how it would work. Are you volunteering? ;-)

Otherwise something in the README might be in order -- I just spotted #289; there will likely be others.

@ChronosMasterOfAllTime
Copy link
Collaborator

@ankitcharolia our version doesn't have a dependency on go or Python. It uses native shell which makes it more portable.

@gl-yziquel
Copy link

goenv should override the system go. But not require it removed.

I had to remove it, and each time I play with my package manager in debian, I fear a chain of dependencies breaking. Luckily, not much dependencies. But you never know when some random install or script pulls in the go dependency back.

So, really, it should not be a "just remove the system go" "solution"... goenv should override the system go.

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

No branches or pull requests

4 participants