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 fails when $HOMEBREW_INSTALL_FROM_API is set #14009

Closed
2 tasks done
alexbarton opened this issue Oct 17, 2022 · 3 comments · Fixed by #14407
Closed
2 tasks done

brew search fails when $HOMEBREW_INSTALL_FROM_API is set #14009

alexbarton opened this issue Oct 17, 2022 · 3 comments · Fixed by #14407
Labels
bug Reproducible Homebrew/brew bug help wanted We want help addressing this outdated PR was locked due to age

Comments

@alexbarton
Copy link

brew config output

HOMEBREW_VERSION: 3.6.5-48-g978a452
ORIGIN: https://github.com/Homebrew/brew
HEAD: 978a452ea7ccdff1ed7377f88add3ff0513ba2b7
Last commit: 13 hours ago
Core tap: N/A
HOMEBREW_PREFIX: /usr/local
HOMEBREW_AUTOREMOVE: set
HOMEBREW_BROWSER: /usr/bin/open
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.KJz7PKFOKZ/org.xquartz:0
HOMEBREW_EDITOR: /usr/local/bin/code --wait
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_INSTALL_FROM_API: set
HOMEBREW_MAKE_JOBS: 12
HOMEBREW_NO_ENV_HINTS: set
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: dodeca-core 64-bit kabylake
Clang: 14.0.0 build 1400
Git: 2.37.0 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.6-x86_64
CLT: 14.0.0.0.1.1661618636
Xcode: N/A

brew doctor output

Your system is ready to brew.

Verification

  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?

Right now, brew search fails (=returns no results) when $HOMEBREW_INSTALL_FROM_API is set. Instead, an error message is shown.

What happened (include all command output)?

brew search doesn't return any results, even when there is a 1:1 match:

❯ brew search neovim
Error: No formulae or casks found for "neovim".
❯ brew info neovim
==> neovim: stable 0.8.0 (bottled)
Ambitious Vim-fork focused on extensibility and agility
https://neovim.io/
Not installed
…

What did you expect to happen?

brew search should return actual results (or at least show a error message that it is not compatible with $HOMEBREW_INSTALL_FROM_API?)

Step-by-step reproduction instructions (by running brew commands)

export HOMEBREW_INSTALL_FROM_API=1
brew search neovim
@alexbarton alexbarton added the bug Reproducible Homebrew/brew bug label Oct 17, 2022
@MikeMcQuaid MikeMcQuaid added the help wanted We want help addressing this label Oct 17, 2022
@Rylan12
Copy link
Member

Rylan12 commented Oct 21, 2022

This looks like it's the same issue as #12557, only now its spread to homebrew/core as well.

One solution was proposed in #13520 but it hasn't really moved forward. Might be worth taking another look now that this affects both main taps (CC @Bo98)

@Bo98
Copy link
Member

Bo98 commented Oct 21, 2022

Homebrew/core was affected long before Homebrew/cask was.

#13520 is ready to ship as is (will need a rebase by now though). It works fine. It's blocked on the desire to get rid of GitHub code search completely which is not possible until other cask taps are on formulae.brew.sh.

#13520 currently uses Algolia for Homebrew/core and Homebrew/cask and GitHub code search for other taps.

@MikeMcQuaid
Copy link
Member

#13520 is ready to ship as is (will need a rebase by now though). It works fine. It's blocked on the desire to get rid of GitHub code search completely which is not possible until other cask taps are on formulae.brew.sh.

#13520 currently uses Algolia for Homebrew/core and Homebrew/cask and GitHub code search for other taps.

Shout if I can help review once PRs are up-to-date. I think ideally we have Algolia/formulae.brew.sh for all Homebrew/cask* taps.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug help wanted We want help addressing this outdated PR was locked due to age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants