-
Notifications
You must be signed in to change notification settings - Fork 2
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
| if OS.mac? && Hardware::CPU.intel? | |
| url "https://github.com/chanzuckerberg/fogg/releases/download/v0.58.3/fogg_0.58.3_darwin_amd64.tar.gz" | |
| sha256 "156fd95b81057f4297abead63b71bb80924a478758bc2c6bd5de1963397912d7" | |
| end | |
| if OS.linux? && Hardware::CPU.intel? | |
| url "https://github.com/chanzuckerberg/fogg/releases/download/v0.58.3/fogg_0.58.3_linux_amd64.tar.gz" | |
| sha256 "86284828c19de738e05545ebbe564169f9342c5ea3bc317d777eace108541213" | |
| end |
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.