aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2009-08-11 14:46:04 +0100
committerMax Howell2009-08-11 14:52:45 +0100
commit90ea28f6ba430d70c59126c56fb11cdc041bedbe (patch)
treeb97bdcd9edea55f292fd1db2199c8ec00653aa02 /Library
parentab9f59f2271ae41faf61e3d362b0b1d240faecda (diff)
downloadbrew-90ea28f6ba430d70c59126c56fb11cdc041bedbe.tar.bz2
Remove MacPorts and Fink from the build environment
Closes Homebrew/homebrew#13
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brewkit.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/brewkit.rb b/Library/Homebrew/brewkit.rb
index 92cd3b65b..c8702c4b1 100644
--- a/Library/Homebrew/brewkit.rb
+++ b/Library/Homebrew/brewkit.rb
@@ -113,6 +113,14 @@ end
ENV.extend HomebrewEnvExtension
+# remove MacPorts and Fink from the PATH, this prevents issues like:
+# http://github.com/mxcl/homebrew/issues/#issue/13
+paths=ENV['PATH'].split(':').reject do |p|
+ p.squeeze! '/'
+ p=~%r[^/opt/local] or p=~%r[^/sw]
+end
+ENV['PATH']=paths*':'
+
def inreplace(path, before, after)
before=Regexp.escape before.to_s