From a69ec7a22bd521d5a48b955bab9c319e761a7851 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 16 Feb 2012 18:13:44 +0000 Subject: [PATCH] Add dev_tools_path to PATH if not in PATH already This prevents what are likely a whole slew of bugs. --- Library/Homebrew/build.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb index f704e05ef6..2b869eeabb 100755 --- a/Library/Homebrew/build.rb +++ b/Library/Homebrew/build.rb @@ -23,6 +23,9 @@ at_exit do ENV.setup_build_environment # we must do this or tools like pkg-config won't get found by configure scripts etc. ENV.prepend 'PATH', "#{HOMEBREW_PREFIX}/bin", ':' unless ORIGINAL_PATHS.include? "#{HOMEBREW_PREFIX}/bin" + # this is a safety measure for Xcode 4.3 which started not installing + # dev tools into /usr/bin as a default + ENV.prepend 'PATH', MacOS.dev_tools_path, ':' unless ORIGINAL_PATHS.include? MacOS.dev_tools_path install(Formula.factory($0)) rescue Exception => e