aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend/ENV.rb
diff options
context:
space:
mode:
authorSamuel John2013-06-04 22:33:24 +0200
committerSamuel John2013-06-04 22:33:24 +0200
commit072e8f903c1c83c62092470d3b313f2245dabcef (patch)
treea0e3c3814c1a605a486ad0c406bb8cb5a99f7a58 /Library/Homebrew/extend/ENV.rb
parent6ea10c37bbe29e1d13e95f93b439ab8575a813aa (diff)
downloadhomebrew-072e8f903c1c83c62092470d3b313f2245dabcef.tar.bz2
ENV.userpaths! Hotfix to prefer brewed stuff
The depends_on 'nose' => :python tests fails even if people did `pip install nose` with their brewed pythons because during the tests the PATH is set up such that /usr/bin comes before HOMEBRE_PREFIX/bin. This is a hot fix. Proper fix need resorting the PATH.
Diffstat (limited to 'Library/Homebrew/extend/ENV.rb')
-rw-r--r--Library/Homebrew/extend/ENV.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index 0eaa94255..273fa6e8c 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -440,6 +440,8 @@ class << ENV
def userpaths!
paths = ORIGINAL_PATHS.map { |p| p.realpath.to_s rescue nil } - %w{/usr/X11/bin /opt/X11/bin}
self['PATH'] = paths.unshift(*self['PATH'].split(":")).uniq.join(":")
+ # XXX hot fix to prefer brewed stuff (e.g. python) over /usr/bin.
+ prepend 'PATH', HOMEBREW_PREFIX/'bin', ':'
end
def with_build_environment