From f4ffb754c37d3a83906d31a141245d367688996f Mon Sep 17 00:00:00 2001 From: Camillo Lugaresi Date: Wed, 15 Dec 2010 22:45:18 +0100 Subject: [PATCH] ensure brewed bins are in path before installing This makes sure that formulas find the correct pkg-config. Signed-off-by: Adam Vandenberg --- Library/Homebrew/install.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb index b7de5df106..fcf35953fb 100755 --- a/Library/Homebrew/install.rb +++ b/Library/Homebrew/install.rb @@ -53,6 +53,12 @@ end def install f show_summary_heading = false + paths = ENV['PATH'].split(':').map{ |p| File.expand_path p } + rootbin = (HOMEBREW_PREFIX+'bin').to_s + unless paths.include? rootbin + ENV.prepend 'PATH', rootbin, ':' + end + f.deps.uniq.each do |dep| dep = Formula.factory dep if dep.keg_only? @@ -149,7 +155,6 @@ def install f show_summary_heading = true else # warn the user if stuff was installed outside of their PATH - paths = ENV['PATH'].split(':').map{ |p| File.expand_path p } [f.bin, f.sbin].each do |bin| if bin.directory? rootbin = (HOMEBREW_PREFIX/bin.basename).to_s