aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask
diff options
context:
space:
mode:
authorBen Muschol2017-08-13 13:10:38 -0400
committerBen Muschol2017-08-13 15:03:44 -0400
commite93ec12b32f3449f4669cf53469a4d5308b10cc3 (patch)
tree72476000915220c84b580c3628a33efe26d524b1 /Library/Homebrew/cask
parentd6d681ca01f8acf6b8d5e66cc1ca67310e9b8913 (diff)
downloadbrew-e93ec12b32f3449f4669cf53469a4d5308b10cc3.tar.bz2
Remove duplicate url generation logic in Github module
Diffstat (limited to 'Library/Homebrew/cask')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/search.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/search.rb b/Library/Homebrew/cask/lib/hbc/cli/search.rb
index 643d18d55..0cc4cc56c 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/search.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/search.rb
@@ -15,8 +15,9 @@ module Hbc
end
def self.search_remote(query)
- matches = GitHub.search_code("user:caskroom", "path:Casks", "filename:#{query}", "extension:rb")
- [*matches].map do |match|
+ matches = GitHub.search_code(user: "caskroom", path: "Casks",
+ filename: query, extension: "rb")
+ Array(matches).map do |match|
tap = Tap.fetch(match["repository"]["full_name"])
next if tap.installed?
"#{tap.name}/#{File.basename(match["path"], ".rb")}"