Description
When attempting to upgrade fogg
on an M1 Mac, I receive the following error:
» brew upgrade fogg
Error: formulae require at least a URL
/opt/homebrew/Library/Homebrew/formula.rb:271:in `determine_active_spec'
/opt/homebrew/Library/Homebrew/formula.rb:206:in `initialize'
/opt/homebrew/Library/Homebrew/formulary.rb:153:in `new'
/opt/homebrew/Library/Homebrew/formulary.rb:153:in `get_formula'
/opt/homebrew/Library/Homebrew/formulary.rb:366:in `factory'
/opt/homebrew/Library/Homebrew/cli/parser.rb:663:in `block in formulae'
/opt/homebrew/Library/Homebrew/cli/parser.rb:659:in `map'
/opt/homebrew/Library/Homebrew/cli/parser.rb:659:in `formulae'
/opt/homebrew/Library/Homebrew/cli/parser.rb:302:in `parse'
/opt/homebrew/Library/Homebrew/cmd/upgrade.rb:97:in `upgrade'
/opt/homebrew/Library/Homebrew/brew.rb:122:in `<main>'
Digging into the problematic formulae, I believe the problem is here:
Lines 11 to 18 in e24ff93
Note that the definition here has no catch-all case for handling unspecified architectures, nor does it have a case for ARM64 Macs (M1 Macs).
Installing fogg directly from it's source repository https://github.com/chanzuckerberg/fogg works without issue, so I'm confident the issue exists in the Homebrew formula for fogg.
We should probably change things up a bit. Using steampipe
as an example, they build fat binaries and only check that the user is attempting to install on Mac:
Another example is the OpenSSL formulae, which simply builds an ARM64 version of the package and specifies it as a bottle:
Using either approach should work.