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.
This commit is contained in:
parent
beb5f97614
commit
6762780f3e
@ -120,12 +120,16 @@ class Cmd
|
|||||||
args << "-I#{path}" if iset.add?(path.cleanpath)
|
args << "-I#{path}" if iset.add?(path.cleanpath)
|
||||||
when /^-L(.+)/
|
when /^-L(.+)/
|
||||||
path = $1.chuzzle || whittler.next
|
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}
|
when %r{^/opt}, %r{^/sw}, %r{/usr/X11}
|
||||||
# NOOP
|
false
|
||||||
else
|
else
|
||||||
args << "-L#{path}" if lset.add?(path.cleanpath)
|
true
|
||||||
end
|
end
|
||||||
|
args << "-L#{path}" if doit and lset.add?(path.cleanpath)
|
||||||
else
|
else
|
||||||
args << arg
|
args << arg
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user