From d9f64a157407cc5c9a5bc6bf9fc9a7c7f4ffdfd4 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Tue, 26 Mar 2013 11:14:09 -0700 Subject: doctor: check for all DYLD env vars --- Library/Homebrew/cmd/doctor.rb | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) (limited to 'Library/Homebrew') diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 3eb04a505..df33b35e0 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -635,31 +635,25 @@ def check_for_config_scripts end end -def check_for_DYLD_LIBRARY_PATH - if ENV['DYLD_LIBRARY_PATH'] - <<-EOS.undent - Setting DYLD_LIBRARY_PATH can break dynamic linking. - You should probably unset it. - EOS - end -end - -def check_for_DYLD_FALLBACK_LIBRARY_PATH - if ENV['DYLD_FALLBACK_LIBRARY_PATH'] - <<-EOS.undent - Setting DYLD_FALLBACK_LIBRARY_PATH can break dynamic linking. - You should probably unset it. +def check_DYLD_vars + found = ENV.keys.grep(/^DYLD_/) + unless found.empty? + s = <<-EOS.undent + Setting DYLD_* vars can break dynamic linking. + Set variables: EOS - end -end + found.each do |e| + s << " #{e}\n" + end + if found.include? 'DYLD_INSERT_LIBRARIES' + s += <<-EOS.undent -def check_for_DYLD_INSERT_LIBRARIES - if ENV['DYLD_INSERT_LIBRARIES'] - <<-EOS.undent Setting DYLD_INSERT_LIBRARIES can cause Go builds to fail. Having this set is common if you use this software: http://asepsis.binaryage.com/ - EOS + EOS + end + s end end -- cgit v1.2.3