cmd/link: change default_prefix? check to /usr/local check
Linking macOS-provided software breaks things only in `/usr/local` prefixes, hence the `default_prefix?` check, which was included when our only default prefix on macOS was `/usr/local`. Now that we install into `/opt/homebrew` too, the default prefix check is needlessly restrictive.
This commit is contained in:
parent
976f9daa12
commit
19953c01b3
@ -89,7 +89,7 @@ module Homebrew
|
||||
end
|
||||
|
||||
if keg_only
|
||||
if Homebrew.default_prefix? && formula.present? && formula.keg_only_reason.by_macos?
|
||||
if HOMEBREW_PREFIX.to_s == "/usr/local" && formula.present? && formula.keg_only_reason.by_macos?
|
||||
caveats = Caveats.new(formula)
|
||||
opoo <<~EOS
|
||||
Refusing to link macOS provided/shadowed software: #{keg.name}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user