Fix error caused by removal of String#undent#32
Open
brandt wants to merge 2 commits into
Open
Conversation
Swaps out `String#undent` for `<<~EOF`. Background ------------ Homebrew removed their monkeypatch of `String#undent` in Homebrew/brew#4392 which is causing this error: ``` $ brew info bnl blendle/blendle/bnl: stable b2e7a94623b490dcbe5d5c2cb29c68d26433725a, HEAD Blendle Command-Line Tools https://github.com/blendle/bnl Not installed From: https://github.com/blendle/homebrew-blendle/blob/HEAD/Formula/bnl.rb ==> Options --HEAD Install HEAD version Error: undefined method `undent' for #<String:0x000000013d8c3c58> Did you mean? undef indent indent! /opt/homebrew/Library/Taps/blendle/homebrew-blendle/Formula/bnl.rb:19:in `caveats' /opt/homebrew/Library/Homebrew/caveats.rb:23:in `caveats' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:224:in `empty?' /opt/homebrew/Library/Homebrew/cmd/info.rb:335:in `info_formula' /opt/homebrew/Library/Homebrew/cmd/info.rb:153:in `block in print_info' /opt/homebrew/Library/Homebrew/cmd/info.rb:148:in `each' /opt/homebrew/Library/Homebrew/cmd/info.rb:148:in `each_with_index' /opt/homebrew/Library/Homebrew/cmd/info.rb:148:in `print_info' /opt/homebrew/Library/Homebrew/cmd/info.rb:111:in `info' /opt/homebrew/Library/Homebrew/brew.rb:93:in `<main>' ```
Calling `ohai` isn’t needed here and is currently breaks JSON output. Example of the issue this change fixes:
```
brew info --all --json
==> For autocompletion try this:
zsh:
source <(bnl completion zsh)
bash, fish:
Nothing yet :-(
[
{
"name": "a2ps",
"full_name": "a2ps",
"tap": "homebrew/core",
"oldname": null,
… *snip* -------------------------------->8
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Swaps out
String#undentfor<<~EOF. Also removes the unneeded use ofohaiin the caveats section which breaks JSON output.Background
Homebrew removed their monkeypatch of
String#undentin Homebrew/brew#4392 which is causing this error: