-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
rbenv init creates duplicates in PATH #1573
Comments
Hi, if you run set -gx PATH '/Users/mislav/.rbenv/shims' $PATH
set -gx RBENV_SHELL fish
command rbenv rehash 2>/dev/null
function rbenv
set command $argv[1]
set -e argv[1]
switch "$command"
case rehash shell
rbenv "sh-$command" $argv|source
case '*'
command rbenv "$command" $argv
end
end I only see the shims path being added once. Could it be that something else is adding another shims path, or that you're running a shell within a shell and that both edited PATH? |
It sounds like rbenv init is being invoked twice.
When Some more background: rbenv initially tried to be "clever" and only add the shims if they weren't present: 03fa148 This causes no end of problems thanks to poor handling of *rc and *profile files by some OS configurations (most notably, OS X back in the day). #369 So the de-duping was subsequently reverted: e2173df Current behavior is now intentional ( |
Thanks for the answers, yes I've read the doc and saw Invoked only once and if I remove it and logout to be sure, no shims anymore (from rbenv) in my path. Btw Fish already handles dupes in PATH if you use the fish idiomatic way I'll try on a second machine and let you know. Edit: |
Hello, adding
rbenv init - | source
inconfig.fish
adds twice theshims
path (same issue onnodenv
but not onpyenv
).The text was updated successfully, but these errors were encountered: