Added rescue block for the remote cask search failure
This commit is contained in:
parent
00803b1a0b
commit
a5640fdfee
@ -19,8 +19,18 @@ module Hbc
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.search_remote(query)
|
def self.search_remote(query)
|
||||||
matches = GitHub.search_code(user: "caskroom", path: "Casks",
|
matches = begin GitHub.search_code(
|
||||||
filename: query, extension: "rb")
|
user: "caskroom",
|
||||||
|
path: "Casks",
|
||||||
|
filename: query,
|
||||||
|
extension: "rb"
|
||||||
|
)
|
||||||
|
rescue Exception => e
|
||||||
|
onoe e
|
||||||
|
$stderr.puts e.backtrace
|
||||||
|
[]
|
||||||
|
end
|
||||||
|
|
||||||
matches.map do |match|
|
matches.map do |match|
|
||||||
tap = Tap.fetch(match["repository"]["full_name"])
|
tap = Tap.fetch(match["repository"]["full_name"])
|
||||||
next if tap.installed?
|
next if tap.installed?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user