This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
Remove standard output from with_rubygems
#7122
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR might be very specific to my setup, but it would certainly help me.
What was the end-user problem that led to this PR?
The problem was that sometimes I don't find out early about rubocop issues, so I have to push extra commits to fix them, and that means time and CI resources.
What was your diagnosis of the problem?
My diagnosis was that:
ENV["RGV"] = master
, so that I always run the latest rubygems.Because of setting
ENV["RGV"]
, thewith_rubygems
script is run everytime a binstub is loaded (includingrubocop
). This script prints some git information to the standard output. Since ALE expects a very specific output fromrubocop
, the fact that thewith_rubygems
script prints stuff to the standard output means that ALE no longer works, and I don't get to early fix style issues.What is your fix for the problem, implemented in this PR?
My fix is to make the
with_rubygems
script be silent.Why did you choose this fix out of the possible options?
I could've removed loading the
with_rubygems
script from therubocop
binstub, but I chose this fix because other subcommands in the script already seemed to try to be silent, like the--quiet
flag passed togit checkout
.