Skip to content

Commit

Permalink
cmd/desc: fix handling of --eval-all with formulae
Browse files Browse the repository at this point in the history
This was caused by some refactoring of `Formula.all` a few months ago.

In this case, `eval-all` was not propagated to the Formula.all command
which caused a few different description related commands not to work.

Broken commands:
- `brew search --desc --eval-all TERM`
- `brew desc --search --eval-all TERM`
- `brew desc --descriptions --eval-all TERM`
  • Loading branch information
apainintheneck committed Nov 8, 2023
1 parent 3baec05 commit 9a90c0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Homebrew/description_cache_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def populate_if_empty!(eval_all: Homebrew::EnvConfig.eval_all?)
return unless eval_all
return unless database.empty?

Formula.all.each { |f| update!(f.full_name, f.desc) }
Formula.all(eval_all: eval_all).each { |f| update!(f.full_name, f.desc) }

Check warning on line 37 in Library/Homebrew/description_cache_store.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/description_cache_store.rb#L37

Added line #L37 was not covered by tests
end

# Use an update report to update the {DescriptionCacheStore}.
Expand Down

0 comments on commit 9a90c0f

Please sign in to comment.