rubygems / bundler

Manage your Ruby application's gem dependencies
https://bundler.io
MIT License
4.88k stars 1.99k forks source link

Fix another silent rubygems issue #7493

Closed deivid-rodriguez closed 4 years ago

deivid-rodriguez commented 4 years ago

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

The problem was that we still have some issues where using the gem script on a bundler context is silenced.

What was your diagnosis of the problem?

My diagnosis was that bundle exec adds -rbundler/setup to RUBYOPT which silences rubygems output, and that we need to reset rubygems UI after that so that if we end up shelling out to gem, it is not silent. The previous approach worked for loading the gem script in-process, but didn't work in other case.

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

My fix is to reset rubygems UI right after bundler/setup.

Why did you choose this fix out of the possible options?

I chose this fix because it fixes the problem independently of the rubygems version being run, but we can probably also fix this more cleanly inside the gem script by adding something like Gem::DefaultUserInteraction.ui = Gem::ConsoleUI.new at the top of the script.

Fixes #7490.

deivid-rodriguez commented 4 years ago

@doudou Does this work for you?

doudou commented 4 years ago

@doudou Does this work for you?

Seems to work, yes. Thanks !

deivid-rodriguez commented 4 years ago

Thanks for confirming! I'll get this in and try to get a bug fix release as soon as possible.

@bundlerbot merge

ghost commented 4 years ago

Build succeeded

doudou commented 4 years ago

Thanks for confirming! I'll get this in and try to get a bug fix release as soon as possible.

@bundlerbot merge

Hi ...

Would you maybe have an ETA on how fast the point release might get out ? It's pretty bad for us.

deivid-rodriguez commented 4 years ago

Next day or two.