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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default paths for rvm-auto-ruby #1864

Closed
wants to merge 1 commit into from
Closed

Conversation

joennlae
Copy link

@joennlae joennlae commented Apr 2, 2024

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

@joennlae joennlae requested a review from a team as a code owner April 2, 2024 10:40
@joennlae
Copy link
Author

joennlae commented Apr 2, 2024

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
Copy link
Member

@vinistock vinistock left a 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.

Comment on lines +24 to +25
"/usr/local/rvm/bin",
"/usr/share/rvm/bin",
Copy link
Member

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?

Copy link

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.

image

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");
Copy link
Member

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?

@vinistock
Copy link
Member

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!

@vinistock vinistock closed this Apr 2, 2024
@joennlae
Copy link
Author

joennlae commented Apr 2, 2024

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

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.

Failed to activate rvm environment
3 participants