superatomic / homebrew-bundle-extensions

🗄 Command extensions for Homebrew that allow for easy modification of brew bundles.
https://gh.superatomic.dev/homebrew-bundle-extensions
BSD 2-Clause "Simplified" License
14 stars 2 forks source link

`brew add` fails with the error `Error: unknown keyword: prefer_loading_from_api` #5

Closed superatomic closed 2 years ago

superatomic commented 2 years ago

To reproduce the error, simply run any brew add [FORMULA|CASK...] command, like so:

$ brew add coreutils
Error: unknown keyword: prefer_loading_from_api
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:54:in `to_formulae_and_casks'
/usr/local/Homebrew/Library/Taps/superatomic/homebrew-bundle-extensions/cmd/add.rb:35:in `add'
/usr/local/Homebrew/Library/Homebrew/brew.rb:93:in `<main>'

This error is caused by the method to_formulae_and_casks losing the prefer_loading_from_api argument. Removing it should resolve this error.