Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brew search return "Error: formulae require at least a URL" #267

Open
rdndnl opened this issue Feb 17, 2024 · 0 comments
Open

brew search return "Error: formulae require at least a URL" #267

rdndnl opened this issue Feb 17, 2024 · 0 comments

Comments

@rdndnl
Copy link

rdndnl commented Feb 17, 2024

➜  ~ brew config
HOMEBREW_VERSION: 4.2.8
ORIGIN: https://github.com/Homebrew/brew
HEAD: eb7338abba43112e16e178d4329d5483d6d8fd6f
Last commit: 5 days ago
Core tap JSON: 17 Feb 12:44 UTC
Core cask tap JSON: 17 Feb 12:44 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.QYEMEV6KBu/org.xquartz:0
HOMEBREW_EDITOR: vi
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.43.2 => /opt/homebrew/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.3.1-arm64
CLT: 15.1.0.0.1.1700200546
Xcode: 15.1
Rosetta 2: false

After "hashicorp/tap/vault" installation, searching formulas for text with "--eval-all" or HOMEBREW_EVAL_ALL set return the following error:

➜  ~ brew search --desc --eval-all something
==> Formulae
/opt/homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading a2ps from API
...
/opt/homebrew/Library/Homebrew/brew.rb (Formulary::FromPathLoader): loading /opt/homebrew/Library/Taps/hashicorp/homebrew-tap/Formula/vagrant.rb
Error: formulae require at least a URL
Please report this issue:
  https://docs.brew.sh/Troubleshooting
/opt/homebrew/Library/Homebrew/formula.rb:307:in `determine_active_spec'
/opt/homebrew/Library/Homebrew/formula.rb:238:in `initialize'
/opt/homebrew/Library/Homebrew/formulary.rb:503:in `new'
/opt/homebrew/Library/Homebrew/formulary.rb:503:in `get_formula'
/opt/homebrew/Library/Homebrew/formulary.rb:745:in `factory'
/opt/homebrew/Library/Homebrew/formula.rb:1930:in `block in all'
/opt/homebrew/Library/Homebrew/formula.rb:1929:in `map'
/opt/homebrew/Library/Homebrew/formula.rb:1929:in `all'
/opt/homebrew/Library/Homebrew/description_cache_store.rb:37:in `populate_if_empty!'
/opt/homebrew/Library/Homebrew/descriptions.rb:14:in `search'
/opt/homebrew/Library/Homebrew/search.rb:29:in `block in search_descriptions'
/opt/homebrew/Library/Homebrew/cache_store.rb:26:in `use'
/opt/homebrew/Library/Homebrew/search.rb:27:in `search_descriptions'
/opt/homebrew/Library/Homebrew/cmd/desc.rb:71:in `desc'
/opt/homebrew/Library/Homebrew/brew.rb:86:in `<main>'

The last formula in the debug output before the error was "homebrew-tap/Formula/vagrant.rb", so I guessed brew was unable to obtain the "url" because an "if OS.mac?" case is missing.
I don't know if it is the right guess, however brew search started work correctly after I added a fake "if OS.mac?" condition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant