- Add heading message to indicate bottle tag used
- Use --no-ext-diff with git to avoid potential problems
- Resolve formula renames to avoid false positives
- Increase parsing stringency
This option tries to find bottles where the bottle was removed
from the formula in the past week and not added back in.
It checks the output of `git log` to see if there are any
bottles that fit this criteria.
We added the `--all` flag (now renamed to `--eval-all`) for various
commands for this behaviour so let's start deprecating this.
Also, introduce a `HOMEBREW_EVAL_ALL` environment variable to use the
existing, less secure, behaviour by default and avoid passing
`--eval-all` everywhere.
Add some `--all` flags we'll eventually migrate to to ensure that we'll
eventually require their usage to read all formulae. Where we need to
do stuff later, add some comments.
Handle a few more edge cases:
- improve the unbottled output heading so it makes sense when we're
outputting bottles that are ready to bottle
- output already bottled formulae if named
- handle Linux/Mac requiring formulae and output if named
- output bottle unneeded/disabled formulae if named
- use green/yellow/red for bottles ready to be built now/later/never
- When testing `brew unbottled <formula>` this crashed because I, as a
maintainer, have `HOMEBREW_NO_ANALYTICS` set on all my machines to
avoid polluting the analytics with test installs.
```
❯ brew unbottled
==> Getting formulae...
==> Getting analytics data...
Error: undefined method `[]' for nil:NilClass
/usr/local/Homebrew/Library/Homebrew/dev-cmd/unbottled.rb:89:in `formulae_all_sort_installs_from_args'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/unbottled.rb:49:in `unbottled'
/usr/local/Homebrew/Library/Homebrew/brew.rb:119:in `<main>'
```