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 bundle plugin install detection of already installed plugins #4869

Merged
merged 6 commits into from Aug 24, 2021

Conversation

deivid-rodriguez
Copy link
Member

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

If you install a version of a plugin, say diffend 0.2.49, and then the latest version, 0.2.50, bundler will incorrectly think that 0.2.50 is already installed, and skip installation.

$ bundle plugin install diffend --version 0.2.49
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using bundler 2.3.0.dev
Installing diffend 0.2.49
Installed plugin diffend

$ bundle plugin install diffend
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using bundler 2.3.0.dev
Using diffend 0.2.50

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

Plugins are regular gems, but they are installed to their own GEM_HOME. My fix is to set the proper GEM_HOME used for plugins, so that the detection of whether a specific version is already installed works in the same way it works for regular gems.

Fixes #4864 (comment).

Make sure the following tasks are checked

@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review August 23, 2021 11:21
@deivid-rodriguez deivid-rodriguez merged commit 582a85c into master Aug 24, 2021
@deivid-rodriguez deivid-rodriguez deleted the plugin_versions branch August 24, 2021 08:52
deivid-rodriguez added a commit that referenced this pull request Sep 2, 2021
Fix `bundle plugin install` detection of already installed plugins

(cherry picked from commit 582a85c)
deivid-rodriguez added a commit that referenced this pull request Sep 2, 2021
Fix `bundle plugin install` detection of already installed plugins

(cherry picked from commit 582a85c)
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.

None yet

2 participants