Skip to content

brew search throws undefined method error - macOS 10.13.6 #4562

@noelforte

Description

@noelforte
  • are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • ran a brew command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew config and brew doctor and included their output with your issue? (Included below)

To help us debug your issue please explain:

What you were trying to do (and why)
I was attempting to run brew search <package name>. I am able to reproduce this issue regardless of the package specified.

What happened (include command output)
After running brew search, I received the following error message:

Error: undefined method `token' for nil:NilClass
Please report this bug:
  https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/searchable.rb:28:in `block in search_string'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask.rb:20:in `block in each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask.rb:19:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask.rb:19:in `each'
/usr/local/Homebrew/Library/Homebrew/searchable.rb:27:in `select'
/usr/local/Homebrew/Library/Homebrew/searchable.rb:27:in `search_string'
/usr/local/Homebrew/Library/Homebrew/searchable.rb:7:in `search'
/usr/local/Homebrew/Library/Homebrew/extend/os/mac/search.rb:29:in `search_casks'
/usr/local/Homebrew/Library/Homebrew/cmd/search.rb:83:in `search'
/usr/local/Homebrew/Library/Homebrew/brew.rb:87:in `<main>'

What you expected to happen
Expected to receive a list of packages, from all taps, matching search string

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

$ brew search <package name>

Additional information

Output of brew doctor:

$ brew doctor
Your system is ready to brew.

Output of brew config:

HOMEBREW_VERSION: 1.7.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: d6a245c05110c240e680da594c2cc6038998b82e
Last commit: 3 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 6517c2ef3174c76f1216e64d23923acf768e712c
Core tap last commit: 14 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_VISUAL: nano
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1000
Git: 2.17.0 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: N/A
macOS: 10.13.6-x86_64
CLT: 10.0.0.0.1.1527767617
Xcode: N/A
XQuartz: 2.7.11 => /opt/X11

Metadata

Metadata

Assignees

Labels

outdatedPR was locked due to age

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions