diff options
| author | Xiyue Deng | 2012-10-31 02:44:18 -0700 |
|---|---|---|
| committer | Max Howell | 2012-11-01 09:51:41 -0400 |
| commit | 6762780f3efd4dcdc2d59438d2a5a93c054c372f (patch) | |
| tree | dc0de8938c78c21a9b31f8259274e3ef570c840d | |
| parent | beb5f9761415899f587a0a61ec795381b9e1764b (diff) | |
| download | brew-6762780f3efd4dcdc2d59438d2a5a93c054c372f.tar.bz2 | |
Whitelist Homebrew's own prefix in superenv.
This allows Homebrew to be installed into /opt or /sw.
Closes Homebrew/homebrew#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.
| -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 |
