Remove MacPorts and Fink from the build environment

Closes Homebrew/homebrew#13
This commit is contained in:
Max Howell 2009-08-11 14:46:04 +01:00
parent ab9f59f227
commit 90ea28f6ba

View File

@ -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