diff options
| author | Xiyue Deng | 2012-10-31 02:44:18 -0700 |
|---|---|---|
| committer | Max Howell | 2012-11-01 09:51:41 -0400 |
| commit | f979e31f5d78b3af9e3c9bb663114891855be552 (patch) | |
| tree | d837acba69d52dbca1306333b18f03080e05ffd0 /Library | |
| parent | 9934b9da1b9ee83f3d461843ae5c104a79bc3feb (diff) | |
| download | homebrew-f979e31f5d78b3af9e3c9bb663114891855be552.tar.bz2 | |
Whitelist Homebrew's own prefix in superenv.
This allows Homebrew to be installed into /opt or /sw.
Closes #15780.
Signed-off-by: Max Howell <mxcl@me.com>
Cleaned up the patch a little. Still ugly though, but logic is unusual so that's just how it is.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/ENV/4.3/cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index cdf69e5f3..6c1b4a0b7 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -120,12 +120,16 @@ class Cmd args << "-I#{path}" if iset.add?(path.cleanpath) when /^-L(.+)/ path = $1.chuzzle || whittler.next - case path.cleanpath + doit = case path.cleanpath + when %r{^#$brewfix} + # maybe homebrew is installed to /sw or /opt/brew + true when %r{^/opt}, %r{^/sw}, %r{/usr/X11} - # NOOP + false else - args << "-L#{path}" if lset.add?(path.cleanpath) + true end + args << "-L#{path}" if doit and lset.add?(path.cleanpath) else args << arg end |
