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

bundle clean --force removes default gem executables #3757

Closed
deivid-rodriguez opened this issue Jun 24, 2020 · 2 comments · Fixed by #3907
Closed

bundle clean --force removes default gem executables #3757

deivid-rodriguez opened this issue Jun 24, 2020 · 2 comments · Fixed by #3907
Labels

Comments

@deivid-rodriguez
Copy link
Member

Thank you for contributing to the rubygems repository, and specifically to the Bundler gem.

Please describe the problem as clearly as you can

We have a bundle clean --force command that removes every gem not in the current bundle from your system. This command goes too far and removes executables from default gems.

Please post system independent reproduction steps

On any application, and on ruby 2.7, run

$ irb --version
irb 1.2.3 (2020-02-15)
$ bundle clean --force
Removing irb (1.2.3)
$ irb --version
Traceback (most recent call last):
	1: from /home/deivid/.rbenv/versions/2.7.1/bin/irb:23:in `<main>'
/home/deivid/.rbenv/versions/2.7.1/bin/irb:23:in `load': cannot load such file -- /home/deivid/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/irb-1.2.3/exe/irb (LoadError)

What command did you run?

bundle clean --force

What were you expecting to happen?

All gems are removed, but not executables from default gems, because default gems should be always available.

What actually happened?

IRB is gone.

NOTE: I experimented with a better issue report template in this issue, will open a PR for it :)

@rubyFeedback
Copy link

Hehe the template is quite funny since it looks as if you are almost talking to yourself there,
in particular with the "Thank you for contributing to the rubygems repository" intro. I mean
you are not exactly a newcomer to rubygems ... ;)

@deivid-rodriguez
Copy link
Member Author

Hehehe, yeah.

In #3784 I put that appreciation message inside <!-- ... -->, so that the OP gets the appreciation, but it doesn't show up by default in the reported issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants