diff options
| author | Adam Vandenberg | 2013-03-26 11:14:09 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2013-03-26 16:19:55 -0700 |
| commit | d9f64a157407cc5c9a5bc6bf9fc9a7c7f4ffdfd4 (patch) | |
| tree | e1f1965ca4bb1b703e33e10150c330f9719658b4 /Library | |
| parent | 3d0318c9136c8611aeada82ca57eaf15b0c41749 (diff) | |
| download | brew-d9f64a157407cc5c9a5bc6bf9fc9a7c7f4ffdfd4.tar.bz2 | |
doctor: check for all DYLD env vars
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 34 |
1 files changed, 14 insertions, 20 deletions
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 |
