Closed jasonkarns closed 3 years ago
This makes sense as an enhancement. I agree brew bundle
should just tap automatically without complaining if a formula is tap-prefixed. The formula is unreadable
is because we're trying to infer information about the formula before it is installed. I see two options:
I think 1) would probably be an easier PR but 2) is probably preferable in terms of e.g. gracefully handling network failures and reading the formula as expected.
Would you be able to give a PR a go for this, @jasonkarns?
Thanks!
2. brew-bundle itself still proceeds to tap and install the formula without requiring an explicit tap
This was tweaked in https://github.com/Homebrew/homebrew-bundle/pull/982 so that it'll at least not try to install these formulae if the tap fails.
Given that and the lack of other requests: passing on this, sorry!
Some behavior of brew-bundle surprised me...
Given a Brewfile that contains a tap-prefixed formulae, say
brew "nejckorasa/tap/dckr"
, the output ofbrew-bundle
generates a warning about tap being necessary:The warning seems unnecessary for two reasons:
So the tap warning seems unnecessary for brew-bundle; and is inconsistent with direct brew-install (which doesn't warn about tap at all).
To answer the (perhaps obvious) question: why don't I just add the
tap
line to my Brewfile to prevent the warning? I've personally encountered a number of projects that have tap lines in their Brewfiles for formulae which have long-since been removed from their Brewfile. Especially for Brewfiles that are more than a few lines, a project will add the tap (presumably to prevent the warning?) along with the formula for which the tap is necessary. Then at some point, they stop using the formula and remove it from the Brewfile, but fail to remove the corresponding tap. So to avoid this, I personally prefer to omit the tap entirely, since it isn't functionally necessary. (As long as brew-bundle continues to tap automatically. Perhaps that is planned to change?)