summaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 031a278..5b92c4c 100644
--- a/Rakefile
+++ b/Rakefile
@@ -31,6 +31,12 @@ task :validate_http_proxy do
if ENV['http_proxy']
proxy_host = URI.parse(ENV['http_proxy']).host
+ if proxy_host.nil?
+ ENV['http_proxy'] = nil
+ $stderr.puts "Ignoring invalid HTTP proxy."
+ return
+ end
+
if ['localhost', '[::1]'].include?(proxy_host) || proxy_host.start_with?('127.0.0.')
abort 'Using an HTTP proxy listening on the loopback is doomed to fail. Aborting.'
end