aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorJack Nagel2013-07-01 16:58:16 -0500
committerJack Nagel2013-07-01 17:00:08 -0500
commit08c3fb0ed2b1ae7d7e756b341bf2f9b2ccd7d889 (patch)
tree3c290a121888cb7d673c74be2410e5f21c52af04 /Library/Homebrew/cmd
parent2e2e6323eba9cedf3070b6b193e0bbdd364f3827 (diff)
downloadhomebrew-08c3fb0ed2b1ae7d7e756b341bf2f9b2ccd7d889.tar.bz2
Better behavior for failed connections in `brew search`
Fixes #20868.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/search.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb
index 2ec8afd81..ea4b655f5 100644
--- a/Library/Homebrew/cmd/search.rb
+++ b/Library/Homebrew/cmd/search.rb
@@ -33,7 +33,11 @@ module Homebrew extend self
if count == 0 and not blacklisted? query
puts "No formula found for #{query.inspect}. Searching open pull requests..."
- GitHub.find_pull_requests(rx) { |pull| puts pull }
+ begin
+ GitHub.find_pull_requests(rx) { |pull| puts pull }
+ rescue GitHub::Error => e
+ opoo e.message
+ end
end
end
end
@@ -81,6 +85,8 @@ module Homebrew extend self
end
end
results
+ rescue GitHub::Error
+ []
end
def search_formulae rx