Gibson Fahnestock 07d571bebc
fix(vendor-gems): redirect bundler stdout to stderr
When running brew commands and interpreting the output, e.g. running
`brew livecheck --json`, it's necessary to stop other programs Homebrew
happens to execute from writing logging output to stdout. Most programs
don't do this, but `bundle install` does seem to.

To reproduce the issue you can run:

```shell
git -C "$(brew --prefix)" clean -ffdx Library/Homebrew/vendor
stdout=$(HOMEBREW_FORCE_VENDOR_RUBY=1 brew livecheck --newer-only --json --cask $(brew --repo homebrew/cask)/Casks/grid.rb)
echo "^^^ was stderr, >>> is stdout: $stdout"
```

If you run it without this change it will print a bunch of output like
this to the stdout before printing out the livecheck JSON output:

```text
Using bundler 1.17.3
Fetching byebug 11.1.3
Fetching coderay 1.1.3
Installing byebug 11.1.3 with native extensions
Installing coderay 1.1.3
Fetching colorize 0.8.1
Installing colorize 0.8.1

[
  # Contents of the JSON block.
]
```

With this change the stdout from `bundle install` will be redirected to
brew's stderr, meaning only the JSON goes to stdout, and the rest goes
to stderr.
2021-06-03 11:18:23 +01:00
..
2021-04-03 04:27:32 +02:00
2021-05-09 18:07:33 +05:30
2021-01-26 15:36:44 -05:00
2021-05-12 13:37:18 +01:00
2021-01-26 16:19:47 -05:00
2021-05-19 12:59:53 -04:00
2021-05-12 13:37:18 +01:00
2021-05-12 13:37:18 +01:00
2021-05-12 13:37:18 +01:00
2021-04-27 00:09:45 -04:00
2021-04-22 13:18:44 +01:00
2021-01-25 13:46:35 -05:00
2021-01-25 13:46:51 -05:00
2021-02-17 17:53:10 +00:00
2021-03-18 16:41:57 +00:00
2021-04-08 20:23:50 +09:00