Skip to content

linuxbrew - brew search throws ruby error on some search terms (that match casks??) #23609

Description

@bobisageek

brew doctor output

> brew doctor
Your system is ready to brew.

Verification

  • I ran brew update twice and am still able to reproduce my issue.
  • My "brew doctor output" above says Your system is ready to brew or a definitely unrelated Tier message.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.
  • I did not use AI/LLM to create this issue, or I disclosed the tool and model used; I will answer maintainer questions myself without AI/LLM.

brew config output

> brew config
HOMEBREW_VERSION: 6.0.18-123-gaf3d8ec
ORIGIN: https://github.com/Homebrew/brew
HEAD: af3d8ec18686d20c412b773306ee23d9554b3334
Last commit: 2 hours ago
Branch: HEAD
Core tap: N/A
Core cask tap: N/A
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
Homebrew Ruby: 4.0.6 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/4.0.6/bin/ruby
CPU: 32-core 64-bit alderlake
Clang: 22.1.8
Git: 2.43.0 => /bin/git
Curl: 8.5.0 => /bin/curl
Kernel: Linux 7.0.11-76070011-generic x86_64 GNU/Linux
Landlock ABI: 8
OS: Pop!_OS 24.04 LTS (noble)
Host glibc: 2.39
Host libstdc++: 6.0.33
/usr/bin/gcc-13: 13.3.0
/usr/bin/ruby: N/A
glibc: N/A
gcc@13: 16.1.0
gcc: 16.1.0
xorg: N/A

What were you trying to do (and why)?

searching for the 'eza' package - I have a habit of searching and then infoing before installing

What happened (include all command output)?

> brew search eza
Error: uninitialized constant Cask::CaskLoader
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/search.rb:186:in 'block in Homebrew::Search.search_casks'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/search.rb:185:in 'Array#each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/search.rb:185:in 'Enumerable#filter_map'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/search.rb:185:in 'Homebrew::Search.search_casks'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/search.rb:209:in 'Homebrew::Search.search_names'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/search.rb:84:in 'Homebrew::Cmd::SearchCmd#run'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:142:in '<main>'
Please report this issue:
  https://docs.brew.sh/Troubleshooting

What did you expect to happen?

a search results output; something like:

> brew search eza
==> Formulae
eza ✔                                              eva

==> Casks
font-belleza                                       font-playwrite-za
font-lalezar                                       font-playwrite-za-guides

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

Specifically on linux (I think; haven't been able to re-create it on a mac):
`brew search eza`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions