summaryrefslogtreecommitdiff
path: root/lib/bundler/fetcher/downloader.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/fetcher/downloader.rb')
-rw-r--r--lib/bundler/fetcher/downloader.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/bundler/fetcher/downloader.rb b/lib/bundler/fetcher/downloader.rb
index 5d30333158..f2aad3a500 100644
--- a/lib/bundler/fetcher/downloader.rb
+++ b/lib/bundler/fetcher/downloader.rb
@@ -68,8 +68,7 @@ module Bundler
raise CertificateFailureError.new(uri)
rescue *HTTP_ERRORS => e
Bundler.ui.trace e
- case e.message
- when /host down:/, /getaddrinfo: nodename nor servname provided/
+ if e.is_a?(SocketError) || e.message =~ /host down:/
raise NetworkDownError, "Could not reach host #{uri.host}. Check your network " \
"connection and try again."
else