aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/search.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cmd/search.rb')
-rw-r--r--Library/Homebrew/cmd/search.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb
index 53767e75f..0718a3af4 100644
--- a/Library/Homebrew/cmd/search.rb
+++ b/Library/Homebrew/cmd/search.rb
@@ -109,8 +109,9 @@ module Homebrew
$stderr.puts Formatter.headline("Searching taps on GitHub...", color: :blue)
valid_dirnames = ["Formula", "HomebrewFormula", "Casks", "."].freeze
- matches = GitHub.search_code("user:Homebrew", "user:caskroom", "filename:#{query}", "extension:rb")
- [*matches].map do |match|
+ matches = GitHub.search_code(user: ["Homebrew", "caskroom"], filename: query, extension: "rb")
+
+ matches.map do |match|
dirname, filename = File.split(match["path"])
next unless valid_dirnames.include?(dirname)
tap = Tap.fetch(match["repository"]["full_name"])