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

fix(RubyGems): support no-sudo updating for rbenv and rvm #820

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

yaroslav
Copy link
Contributor

@yaroslav yaroslav commented Jun 6, 2024

What does this PR do

Currently, when updating RubyGems, the code defaults to sudo-ing it, unless there is asdf in the path. I've added checks for rbenv and rvm Ruby version managers to avoid using sudo.

The idea behind that piece of code may be faulty in the first place, and we should probably check the location or the file permissions of installed RubyGems instead of the pathname, but for a quick fix, should do.

Standards checklist

  • The PR title is descriptive.
  • I have read CONTRIBUTING.md
  • Optional: I have tested the code myself

For new steps

  • Optional: Topgrade skips this step where needed
  • Optional: The --dry-run option works with this step
  • Optional: The --yes option works with this step if it is supported by
    the underlying command

If you developed a feature or a bug fix for someone else and you do not have the
means to test it, please tag this person here.

Copy link
Member

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

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

Thanks!

Also thanks for your explanation of the implementation!

@SteveLauC SteveLauC merged commit 8e16174 into topgrade-rs:main Jun 6, 2024
11 checks passed
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.

2 participants