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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix default paths for rvm-auto-ruby
#1864
Conversation
I have signed the CLA! |
This commit not only checks the path: `/home/user/.rvm/bin` (done before) It also checks if it is in the PATH already and in: `/usr/local/rvm/bin` It additionally adds some output if the initialization fails
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.
Thank you for the PR. I think we should follow the same style as the implementation of chruby, where we first search for the executable path and then invoke asyncExec
only once.
"/usr/local/rvm/bin", | ||
"/usr/share/rvm/bin", |
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.
Can you describe when RVM ends up installed in these directories? I assume one of those is the default for Linux, but why is there two?
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.
Hello, I opened #1862. I installed RVM on Ubuntu with this package per the instructions on the official RVM site. This package only installs RVM in /usr/share/rvm
.
I can't speak to installing in /usr/local/rvm
, but I hope that helps.
]; | ||
// check if rvm-auto-ruby is in the PATH | ||
try { | ||
const pathCheck = await asyncExec("which rvm-auto-ruby"); |
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.
Similar to my previous question, what scenario leads to RVM being in the PATH
, but not installed in one of the other installation directories?
I really appreciate the PR, but since this is affecting many users I ended up putting a fix together so that we can get it out there asap #1868. Thanks again for contributing! |
Thank you for taking it over. I just already spent the time to fix it on my machine so I thought I could contribute :-) I looked at your PR and it seems to me like a much better solution :-) Just to answer the question to how I got to my path: I installed rvm following the official instructions: (https://rvm.io/rvm/install) curl -sSL https://get.rvm.io | bash |
First of all, this is a fantastic project 馃挴 . While setting it up today, I found this issue (#1862) and saw that it was probably introduced recently.
This commit not only checks the path:
/home/user/.rvm/bin
(done before)It also checks if it is in the PATH already and in:
/usr/local/rvm/bin
It additionally adds some output if the initialization fails.
Motivation
Closes #1862
Implementation
It should be self-explanatory.
Automated Tests
I added no additional test, but I tested it on my machine (make of what you want :P)
Manual Tests
I tested it on my machine by installing the extension via the
vsce package