- Use separate method for `not_this_run?` so we can still set the
analytics message as seen when set.
- Clarify when analytics message is printed that we haven't sent any
analytics yet.
More often than I realised, I want to `brew reinstall
--build-from-source --interactive $FORMULA` to add some custom
configuration. It seems like a useful addition?
This makes `Tap` consistent with what the installer is doing.
Generally shallow clones get slower and slower (and more and more
pointless) the more they are fetched so don't make sense for our
use-case.
Keep the option around anyway because it's useful for integration tests.
- A user reported the following error when running `brew gist-logs`,
reproducible with any formula:
```
$ brew gist-logs rustup-init
Error: undefined method `length' for nil:NilClass
Please report this bug:
https://docs.brew.sh/Troubleshooting
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/gist-logs.rb:145:in `gist_logs'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:102:in
```
- From what I can tell, `gist_logs_args.parse` had ended up in the wrong
method. The `gistify_logs` method already has `formula` (ie the
formula name) passed into it. But it's the `gist_logs` method that needs
to do the argument parsing. This was discovered by looking at some other
recently changed ARGV => Homebrew.args code like cmd/info.
Brew prints this error:
```
Error: undefined method `join' for nil:NilClass
```
because, in this code:
```ruby
puts pinned_dependents.map do |f|
"#{f.full_specified_name} #{f.pkg_version}"
end.join(", ")
```
the block is passed to `puts` and not to `map`. `.join(",")` is called on the output of `puts`.
(I think the regression was introduced in this commit: e12a7b0808353ea81d63774be1edaff81710d7a6)
If all the passed packages are currently installed then use
`runtime_dependencies` to get dependency data more quickly and
accurately.
As discussed in https://github.com/Homebrew/brew/issues/6769.
- This makes use of the new /api/formula-linux and /api/analytics-linux
endpoints in formulae.brew.sh to give Linux users up to date formula and
analytics info for their installed core formulae.
Before, on Linux, the macOS stats for the `ack` formula:
```
$ brew info ack
[...]
==> Analytics
install: 12,422 (30 days), 32,742 (90 days), 97,788 (365 days)
install_on_request: 10,778 (30 days), 28,339 (90 days), 85,202 (365 days)
build_error: 0 (30 days)
```
Now, on Linux, the Linux stats for the `ack` formula:
```
$ brew info ack
[...]
==> Analytics
install: 95 (30 days), 242 (90 days), 737 (365 days)
install_on_request: 94 (30 days), 241 (90 days), 734 (365 days)
build_error: 0 (30 days)
```