From d727f8b7f34d6d355bf64233cf49287012f457bc Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Sat, 19 May 2012 19:57:56 -0500 Subject: Replace /usr/bin/ruby with full Framework path Rationale: some users insist on replacing the /usr/bin/ruby symlink to point to another ruby on their system, which may break homebrew. Use the full Framework path instead, which is less likely to be tampered with. This also reorganizes the brew --config checks to reflect the different path. Fixes #12009. Closes #12333. Signed-off-by: Misty De Meo --- Library/Homebrew/cmd/--config.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'Library/Homebrew/cmd/--config.rb') diff --git a/Library/Homebrew/cmd/--config.rb b/Library/Homebrew/cmd/--config.rb index abe247cad..5fb455d23 100644 --- a/Library/Homebrew/cmd/--config.rb +++ b/Library/Homebrew/cmd/--config.rb @@ -91,10 +91,7 @@ module Homebrew extend self puts hardware puts "MacOS: #{MACOS_FULL_VERSION}-#{kernel}" puts "Xcode: #{xcode_version}" - puts "/usr/bin/ruby: #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}" if RUBY_VERSION.to_f != 1.8 - - ruby = Pathname.new("/usr/bin/ruby") - puts "/usr/bin/ruby => #{ruby.realpath}" unless ruby.realpath.to_s =~ %r{^/System} + puts "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby:\n #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}" if RUBY_VERSION.to_f != 1.8 ponk = macports_or_fink_installed? puts "MacPorts/Fink: #{ponk}" if ponk @@ -119,7 +116,6 @@ module Homebrew extend self MacPorts or Fink? #{macports_or_fink_installed?} X11: #{describe_x11} System Ruby: #{RUBY_VERSION}-#{RUBY_PATCHLEVEL} - /usr/bin/ruby => #{real_path("/usr/bin/ruby")} Which Perl: #{describe_perl} Which Python: #{describe_python} Which Ruby: #{describe_ruby} -- cgit v1.2.3