aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorCamillo Lugaresi2010-12-15 22:45:18 +0100
committerAdam Vandenberg2011-03-12 11:55:06 -0800
commitfeed6a9ca25aa400c566d60c233337dc4e49b559 (patch)
tree67447caed8a925c72cd3379729be0d002a4b4e1a /Library
parent7df09b74f23830a760386f8322faeb7e6cfc0dc6 (diff)
downloadhomebrew-feed6a9ca25aa400c566d60c233337dc4e49b559.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>
Diffstat (limited to 'Library')
-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