-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
move ruby discovery code into a function #493
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spotted a few stylistic things.
{ | ||
RUBIES=() | ||
local dir | ||
for dir in "$PREFIX/opt/rubies" "$HOME/.rubies"; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shell script must be hard-tab indented.
share/chruby/chruby.sh
Outdated
done | ||
} | ||
|
||
chruby_discover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to put any non-function code at the end of the file.
Since you're adding a new function, I would technically need to merge this into the 0.4.0 branch. |
When you install a new ruby in a different terminal shell, chruby does not pick up on the new ruby version. The solution is to to source chruby.sh again. Introducing chruby_discover which will allow any shell to pick up on the new ruby versions
Fixed. Thanks for the feedback. I forgot all about tabs. It is ok if you don't want to go this route and bump the major version. |
When you install a new ruby in a different terminal shell, chruby does not pick up on the new ruby version.
The solution is to to source chruby.sh again.
Introducing chruby_discover which will allow any shell to pick up on the new ruby versions
Yes, I was trying to "optimize" this functionality in #492 - but this PR is not an optimization play.
I have had this function defined in my bashrc for a while and thought others may want it as well.