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
commit59fdcfd4d0b5d68423cbcc5033ac3884b39db909 (patch)
treea813cbc9a5dae34c16043b9e9e3fe4e19a899216 /Library/Homebrew/cmd
parent621c44dbd2e9e1887e2f3feff7868e9501c6ba0a (diff)
downloadbrew-59fdcfd4d0b5d68423cbcc5033ac3884b39db909.tar.bz2
Better behavior for failed connections in `brew search`
Fixes Homebrew/homebrew#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