Skip to content

Fix version parsing when bundler outputs diagnostic messages#44

Open
JoeSouthan wants to merge 1 commit intorubocop:masterfrom
JoeSouthan:joesouthan-fixup-resolving
Open

Fix version parsing when bundler outputs diagnostic messages#44
JoeSouthan wants to merge 1 commit intorubocop:masterfrom
JoeSouthan:joesouthan-fixup-resolving

Conversation

@JoeSouthan
Copy link

When running bundle exec rubocop -v, bundler may output diagnostic messages like "Resolving dependencies" to stdout before the actual RuboCop version number. This caused version detection to fail since the entire stdout was being treated as the version string.

Now we extract only the last line of the output, which contains the actual RuboCop version, while ignoring any bundler messages that appear before it.

When running `bundle exec rubocop -v`, bundler may output diagnostic
messages like "Resolving dependencies" to stdout before the
actual RuboCop version number. This caused version detection to fail
since the entire stdout was being treated as the version string.

Now we extract only the last line of the output, which contains the
actual RuboCop version, while ignoring any bundler messages that
appear before it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant