Skip to content

Commit

Permalink
w/ HOMEBREW_NO_INSTALL_FROM_API, require eval-all
Browse files Browse the repository at this point in the history
  • Loading branch information
rrotter committed Jun 30, 2024
1 parent ede4c4f commit 9a817e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Library/Homebrew/cmd/desc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def run
end

if search_type.present?
if !args.eval_all? && !Homebrew::EnvConfig.eval_all? && Homebrew::EnvConfig.no_install_from_api?
raise UsageError, "`brew desc --search` needs `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!"
end
query = args.named.join(" ")
string_or_regex = Search.query_regexp(query)
return Search.search_descriptions(string_or_regex, args, search_type:)
Expand Down
3 changes: 3 additions & 0 deletions Library/Homebrew/cmd/search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def run
string_or_regex = Search.query_regexp(query)

if args.desc?
if !args.eval_all? && !Homebrew::EnvConfig.eval_all? && Homebrew::EnvConfig.no_install_from_api?
raise UsageError, "`brew search --desc` needs `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!"
end
Search.search_descriptions(string_or_regex, args)
elsif args.pull_request?
search_pull_requests(query)
Expand Down

0 comments on commit 9a817e0

Please sign in to comment.