Merge pull request #6963 from puxlit/bugfix/#6961-remove-dyld-checks
doctor: remove DYLD checks
This commit is contained in:
commit
31aaf48322
@ -474,28 +474,6 @@ module Homebrew
|
||||
EOS
|
||||
end
|
||||
|
||||
def check_ld_vars
|
||||
ld_vars = ENV.keys.grep(/^(|DY)LD_/)
|
||||
return if ld_vars.empty?
|
||||
|
||||
values = ld_vars.map { |var| "#{var}: #{ENV.fetch(var)}" }
|
||||
message = inject_file_list values, <<~EOS
|
||||
Setting DYLD_* or LD_* variables can break dynamic linking.
|
||||
Set variables:
|
||||
EOS
|
||||
|
||||
if ld_vars.include? "DYLD_INSERT_LIBRARIES"
|
||||
message += <<~EOS
|
||||
|
||||
Setting DYLD_INSERT_LIBRARIES can cause Go builds to fail.
|
||||
Having this set is common if you use this software:
|
||||
#{Formatter.url("https://asepsis.binaryage.com/")}
|
||||
EOS
|
||||
end
|
||||
|
||||
message
|
||||
end
|
||||
|
||||
def check_for_symlinked_cellar
|
||||
return unless HOMEBREW_CELLAR.exist?
|
||||
return unless HOMEBREW_CELLAR.symlink?
|
||||
|
||||
@ -113,26 +113,6 @@ describe Homebrew::Diagnostic::Checks do
|
||||
HOMEBREW_CELLAR.mkpath
|
||||
end
|
||||
|
||||
specify "#check_ld_vars catches LD vars" do
|
||||
ENV["LD_LIBRARY_PATH"] = "foo"
|
||||
expect(subject.check_ld_vars).to match("Setting DYLD_\\* or LD_\\* variables")
|
||||
end
|
||||
|
||||
specify "#check_ld_vars catches DYLD vars" do
|
||||
ENV["DYLD_LIBRARY_PATH"] = "foo"
|
||||
expect(subject.check_ld_vars).to match("Setting DYLD_\\* or LD_\\* variables")
|
||||
end
|
||||
|
||||
specify "#check_ld_vars catches LD and DYLD vars" do
|
||||
ENV["LD_LIBRARY_PATH"] = "foo"
|
||||
ENV["DYLD_LIBRARY_PATH"] = "foo"
|
||||
expect(subject.check_ld_vars).to match("Setting DYLD_\\* or LD_\\* variables")
|
||||
end
|
||||
|
||||
specify "#check_ld_vars returns success when neither LD nor DYLD vars are set" do
|
||||
expect(subject.check_ld_vars).to be nil
|
||||
end
|
||||
|
||||
specify "#check_tmpdir" do
|
||||
ENV["TMPDIR"] = "/i/don/t/exis/t"
|
||||
expect(subject.check_tmpdir).to match("doesn't exist")
|
||||
|
||||
@ -28,9 +28,4 @@ describe Homebrew::Diagnostic::Checks do
|
||||
expect(subject.check_ruby_version)
|
||||
.to match "Ruby version 1.8.6 is unsupported on 10.12"
|
||||
end
|
||||
|
||||
specify "#check_dyld_insert" do
|
||||
ENV["DYLD_INSERT_LIBRARIES"] = "foo"
|
||||
expect(subject.check_ld_vars).to match("Setting DYLD_INSERT_LIBRARIES")
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user