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

Use activated environment by RVM #1868

Merged
merged 2 commits into from Apr 2, 2024
Merged

Use activated environment by RVM #1868

merged 2 commits into from Apr 2, 2024

Conversation

vinistock
Copy link
Member

Motivation

Closes #1863, closes #1866, closes #1858

There were two issues with our previous implementation of RVM activation:

  1. For some reason, when I first tested, rvm-auto-ruby was not setting environment variables as expected. I must have done something wrong, because it does set variables properly. This is really important for RVM because it overrides GEM_HOME and GEM_PATH, which means we can't rely on Ruby's defaults
  2. You can install RVM under /usr/local/rvm and not just ~/.rvm

Implementation

  1. Added a method to search for the RVM installation, accounting for the other directory we missed
  2. Switched the implementation to basically match what we do for Mise and Shadowenv. We just invoke RVM and let it set the environment

Automated Tests

Changed the existing tests.

@vinistock vinistock added bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes labels Apr 2, 2024
@vinistock vinistock self-assigned this Apr 2, 2024
@vinistock vinistock requested a review from a team as a code owner April 2, 2024 19:25
@vinistock vinistock requested review from andyw8 and Morriar April 2, 2024 19:25
Copy link
Contributor

@andyw8 andyw8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(not tophatted since I don't have RVM available)

@vinistock vinistock merged commit 7395355 into main Apr 2, 2024
41 checks passed
@vinistock vinistock deleted the vs/fix_rvm branch April 2, 2024 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes
Projects
None yet
2 participants