Skip to content

Error: undefined method 'empty?' for nil #21348

@ndegruchy

Description

@ndegruchy

brew config AND brew doctor output OR brew gist-logs <formula> link

$ brew config
HOMEBREW_VERSION: 5.0.8-15-g7543440
ORIGIN: https://github.com/Homebrew/brew
HEAD: 754344022ff6b44f759c04b828fed0e9a76e3216
Last commit: 28 hours ago
Branch: main
Core tap JSON: 01 Jan 16:39 UTC
Core cask tap JSON: 01 Jan 16:39 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: ["--appdir=/Users/ndegruchy/Applications", "--no-quarantine"]
HOMEBREW_DOWNLOAD_CONCURRENCY: 20
HOMEBREW_EDITOR: bbedit --wait --resume
HOMEBREW_FORBID_PACKAGES_FROM_PATHS: set
HOMEBREW_MAKE_JOBS: 10
HOMEBREW_NO_ANALYTICS: set
HOMEBREW_NO_ENV_HINTS: set
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.4.8 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.4.8/bin/ruby
CPU: deca-core 64-bit arm_firestorm_icestorm
Clang: 17.0.0 build 1700
Git: 2.50.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 26.2-arm64
CLT: 26.2.0.0.1.1764812424
Xcode: N/A
Rosetta 2: false


 doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  icu4c@77

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • 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.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.
  • My issue is not about a failure to build a formula from source.

What were you trying to do (and why)?

Doing my morning brew update and I get this. I can reproduce it at least once a day.

What happened (include all command output)?

==> Updating Homebrew...
Updated 2 taps (homebrew/core and homebrew/cask).
==> Outdated Formulae
libheif

You have 1 outdated formula installed.
You can upgrade it with brew upgrade
or list it with brew outdated.
Error: undefined method 'empty?' for nil
Warning: Removed Sorbet lines from backtrace!
/opt/homebrew/Library/Homebrew/api/cask.rb:252:in 'Homebrew::API::Cask.generate_cask_struct_hash'
/opt/homebrew/Library/Homebrew/cask/cask_loader.rb:346:in 'Cask::CaskLoader::FromAPILoader#load'
/opt/homebrew/Library/Homebrew/cask/cask_loader.rb:154:in 'Cask::CaskLoader::FromPathLoader#load'
/opt/homebrew/Library/Homebrew/cask/cask_loader.rb:493:in 'Cask::CaskLoader.load'
/opt/homebrew/Library/Homebrew/cask/migrator.rb:30:in 'Cask::Migrator.migrate_if_needed'
/opt/homebrew/Library/Homebrew/cmd/update-report.rb:682:in 'block in Reporter#migrate_cask_rename'
/opt/homebrew/Library/Homebrew/cmd/update-report.rb:681:in 'Array#each'
/opt/homebrew/Library/Homebrew/cmd/update-report.rb:681:in 'Reporter#migrate_cask_rename'
/opt/homebrew/Library/Homebrew/cmd/update-report.rb:184:in 'Array#each'
/opt/homebrew/Library/Homebrew/cmd/update-report.rb:184:in 'Homebrew::Cmd::UpdateReport#output_update_report'
/opt/homebrew/Library/Homebrew/cmd/update-report.rb:33:in 'Homebrew::Cmd::UpdateReport#run'
/opt/homebrew/Library/Homebrew/brew.rb:102:in '<main>'
Please report this issue:
  https://docs.brew.sh/Troubleshooting

What did you expect to happen?

No error, just the update note.

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

`brew update` when something has changed on Brew's side.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions