os/mac/diagnostic: remove some old/unneeded checks.
This commit is contained in:
parent
699d543ecd
commit
c3a46bc570
@ -11,7 +11,6 @@ module Homebrew
|
|||||||
check_xcode_license_approved
|
check_xcode_license_approved
|
||||||
check_xcode_up_to_date
|
check_xcode_up_to_date
|
||||||
check_clt_up_to_date
|
check_clt_up_to_date
|
||||||
check_for_other_package_managers
|
|
||||||
].freeze
|
].freeze
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -136,21 +135,6 @@ module Homebrew
|
|||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_for_other_package_managers
|
|
||||||
ponk = MacOS.macports_or_fink
|
|
||||||
return if ponk.empty?
|
|
||||||
|
|
||||||
<<~EOS
|
|
||||||
You have MacPorts or Fink installed:
|
|
||||||
#{ponk.join(", ")}
|
|
||||||
|
|
||||||
This can cause trouble. You don't have to uninstall them, but you may want to
|
|
||||||
temporarily move them out of the way, e.g.
|
|
||||||
|
|
||||||
sudo mv /opt/local ~/macports
|
|
||||||
EOS
|
|
||||||
end
|
|
||||||
|
|
||||||
def check_ruby_version
|
def check_ruby_version
|
||||||
ruby_version = "2.3.7"
|
ruby_version = "2.3.7"
|
||||||
return if RUBY_VERSION == ruby_version
|
return if RUBY_VERSION == ruby_version
|
||||||
@ -200,19 +184,6 @@ module Homebrew
|
|||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_for_bad_curl
|
|
||||||
return unless MacOS.version <= "10.8"
|
|
||||||
return if Formula["curl"].installed?
|
|
||||||
|
|
||||||
<<~EOS
|
|
||||||
The system curl on 10.8 and below is often incapable of supporting
|
|
||||||
modern secure connections & will fail on fetching formulae.
|
|
||||||
|
|
||||||
We recommend you:
|
|
||||||
brew install curl
|
|
||||||
EOS
|
|
||||||
end
|
|
||||||
|
|
||||||
def check_xcode_license_approved
|
def check_xcode_license_approved
|
||||||
# If the user installs Xcode-only, they have to approve the
|
# If the user installs Xcode-only, they have to approve the
|
||||||
# license or no "xc*" tool will work.
|
# license or no "xc*" tool will work.
|
||||||
@ -236,18 +207,6 @@ module Homebrew
|
|||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_for_beta_xquartz
|
|
||||||
return unless MacOS::XQuartz.version.to_s.include?("beta")
|
|
||||||
|
|
||||||
<<~EOS
|
|
||||||
The following beta release of XQuartz is installed: #{MacOS::XQuartz.version}
|
|
||||||
|
|
||||||
XQuartz beta releases include address sanitization, and do not work with
|
|
||||||
all software; notably, wine will not work with beta releases of XQuartz.
|
|
||||||
We recommend only installing stable releases of XQuartz.
|
|
||||||
EOS
|
|
||||||
end
|
|
||||||
|
|
||||||
def check_filesystem_case_sensitive
|
def check_filesystem_case_sensitive
|
||||||
dirs_to_check = [
|
dirs_to_check = [
|
||||||
HOMEBREW_PREFIX,
|
HOMEBREW_PREFIX,
|
||||||
|
|||||||
@ -1,12 +1,6 @@
|
|||||||
require "diagnostic"
|
require "diagnostic"
|
||||||
|
|
||||||
describe Homebrew::Diagnostic::Checks do
|
describe Homebrew::Diagnostic::Checks do
|
||||||
specify "#check_for_other_package_managers" do
|
|
||||||
allow(MacOS).to receive(:macports_or_fink).and_return(["fink"])
|
|
||||||
expect(subject.check_for_other_package_managers)
|
|
||||||
.to match("You have MacPorts or Fink installed:")
|
|
||||||
end
|
|
||||||
|
|
||||||
specify "#check_for_unsupported_macos" do
|
specify "#check_for_unsupported_macos" do
|
||||||
ENV.delete("HOMEBREW_DEVELOPER")
|
ENV.delete("HOMEBREW_DEVELOPER")
|
||||||
allow(OS::Mac).to receive(:prerelease?).and_return(true)
|
allow(OS::Mac).to receive(:prerelease?).and_return(true)
|
||||||
@ -15,13 +9,6 @@ describe Homebrew::Diagnostic::Checks do
|
|||||||
.to match("We do not provide support for this pre-release version.")
|
.to match("We do not provide support for this pre-release version.")
|
||||||
end
|
end
|
||||||
|
|
||||||
specify "#check_for_beta_xquartz" do
|
|
||||||
allow(MacOS::XQuartz).to receive(:version).and_return("2.7.10_beta2")
|
|
||||||
|
|
||||||
expect(subject.check_for_beta_xquartz)
|
|
||||||
.to match("The following beta release of XQuartz is installed: 2.7.10_beta2")
|
|
||||||
end
|
|
||||||
|
|
||||||
specify "#check_if_xcode_needs_clt_installed" do
|
specify "#check_if_xcode_needs_clt_installed" do
|
||||||
allow(MacOS).to receive(:version).and_return(OS::Mac::Version.new("10.11"))
|
allow(MacOS).to receive(:version).and_return(OS::Mac::Version.new("10.11"))
|
||||||
allow(MacOS::Xcode).to receive(:installed?).and_return(true)
|
allow(MacOS::Xcode).to receive(:installed?).and_return(true)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user