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 gem uninstall --user-install for symlinked HOME #7645

Merged

Conversation

deivid-rodriguez
Copy link
Member

What was the end-user or developer problem that led to this PR?

gem uninstall --user-install won't work if HOME is symlinked, which is the default on FreeBSD.

What is your fix for the problem, implemented in this PR?

Make sure to expand home to its realpath.

Fixes #6457.

Make sure the following tasks are checked

@deivid-rodriguez deivid-rodriguez changed the title Fix gem uninstall --user-install for symlinked GEM_HOME Fix gem uninstall --user-install for symlinked HOME May 9, 2024
lib/rubygems/defaults.rb Outdated Show resolved Hide resolved
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/user-install-symlinked-gem-home branch 3 times, most recently from 5ddfc59 to 58e3123 Compare May 13, 2024 11:41
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/user-install-symlinked-gem-home branch 2 times, most recently from 2f3b98b to bcfdb96 Compare May 14, 2024 14:44
Tests have two copies of b-2 installed, one in default home and another
in user home. But only the one in default home was visible because of
not reloading paths. The user install test was working by chance.
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/user-install-symlinked-gem-home branch from bcfdb96 to 7f0706a Compare May 16, 2024 10:42
@deivid-rodriguez deivid-rodriguez merged commit 110cfd2 into master May 16, 2024
75 checks passed
@deivid-rodriguez deivid-rodriguez deleted the deivid-rodriguez/user-install-symlinked-gem-home branch May 16, 2024 11:55
deivid-rodriguez added a commit that referenced this pull request May 16, 2024
…symlinked-gem-home

Fix `gem uninstall --user-install`  for symlinked HOME

(cherry picked from commit 110cfd2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gem uninstall --user-install GEM_NAME throws InstallError, even if the gem is installed
3 participants