diff options
| author | Alexey Alekhin | 2017-08-23 16:54:21 +0200 |
|---|---|---|
| committer | Alexey Alekhin | 2017-08-23 16:54:21 +0200 |
| commit | a5640fdfeeea7347e51c14abac481f4b210527ab (patch) | |
| tree | 7e74608b2a2aa02d50c9e531eeaf59d037337040 /Library | |
| parent | 00803b1a0b2a302a84871a05ae2abbdfe7f01a5c (diff) | |
| download | brew-a5640fdfeeea7347e51c14abac481f4b210527ab.tar.bz2 | |
Added rescue block for the remote cask search failure
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/search.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/search.rb b/Library/Homebrew/cask/lib/hbc/cli/search.rb index 42be4592a..9f4f9f31d 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/search.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/search.rb @@ -19,8 +19,18 @@ module Hbc end def self.search_remote(query) - matches = GitHub.search_code(user: "caskroom", path: "Casks", - filename: query, extension: "rb") + matches = begin GitHub.search_code( + user: "caskroom", + path: "Casks", + filename: query, + extension: "rb" + ) + rescue Exception => e + onoe e + $stderr.puts e.backtrace + [] + end + matches.map do |match| tap = Tap.fetch(match["repository"]["full_name"]) next if tap.installed? |
