Merge pull request #12238 from carlocab/link-arm

cmd/link: change `default_prefix?` check to `/usr/local` check
This commit is contained in:
Carlo Cabrera 2021-10-16 00:23:00 +08:00 committed by GitHub
commit fecacdce49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 == HOMEBREW_DEFAULT_PREFIX && formula.present? && formula.keg_only_reason.by_macos?
caveats = Caveats.new(formula)
opoo <<~EOS
Refusing to link macOS provided/shadowed software: #{keg.name}