aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamillo Lugaresi2010-12-15 22:45:18 +0100
committerAdam Vandenberg2011-03-12 11:55:06 -0800
commitf4ffb754c37d3a83906d31a141245d367688996f (patch)
treefdc3312bd8fe8884bfee09cd49e2380f28798122
parentf43be169fe5197b8994bde7c02cd3789f96e66c3 (diff)
downloadbrew-f4ffb754c37d3a83906d31a141245d367688996f.tar.bz2
ensure brewed bins are in path before installing
This makes sure that formulas find the correct pkg-config. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rwxr-xr-xLibrary/Homebrew/install.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb
index b7de5df10..fcf35953f 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