diagnostic: remove check_user_curlrc check.
This commit is contained in:
parent
0bd5869319
commit
d331c47de0
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user