Skip to content
Snippets Groups Projects
Commit d331c47d authored by Mike McQuaid's avatar Mike McQuaid
Browse files

diagnostic: remove check_user_curlrc check.

parent 0bd58693
No related branches found
No related tags found
No related merge requests found
......@@ -480,21 +480,6 @@ module Homebrew
EOS
end
def check_user_curlrc
curlrc_found = %w[CURL_HOME HOME].any? do |var|
ENV[var] && File.exist?("#{ENV[var]}/.curlrc")
end
return unless curlrc_found
<<~EOS
You have a curlrc file
If you have trouble downloading packages with Homebrew, then maybe this
is the problem? If the following command doesn't work, then try removing
your curlrc:
curl #{Formatter.url("https://github.com")}
EOS
end
def check_for_gettext
find_relative_paths("lib/libgettextlib.dylib",
"lib/libintl.dylib",
......
......@@ -131,15 +131,6 @@ describe Homebrew::Diagnostic::Checks do
end
end
specify "#check_user_curlrc" do
mktmpdir do |path|
FileUtils.touch "#{path}/.curlrc"
ENV["CURL_HOME"] = path
expect(subject.check_user_curlrc).to match("You have a curlrc file")
end
end
specify "#check_for_config_scripts" do
mktmpdir do |path|
file = "#{path}/foo-config"
......
......@@ -2,9 +2,14 @@ require "utils/curl"
describe "curl" do
describe "curl_args" do
it "returns -q as the first argument" do
it "returns -q as the first argument when HOMEBREW_CURLRC is set" do
ENV["HOMEBREW_CURLRC"] = "1"
# -q must be the first argument according to "man curl"
expect(curl_args("foo")[1]).to eq("-q")
end
it "doesn't return -q as the first argument when HOMEBREW_CURLRC is not set" do
expect(curl_args("foo")[1]).to_not eq("-q")
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment