Merge pull request #11742 from carlocab/pour-default-prefix
formula: add `:default_prefix` as a standard `pour_bottle?` requirement
This commit is contained in:
commit
349a485886
@ -3016,6 +3016,13 @@ class Formula
|
|||||||
T.cast(self, PourBottleCheck).satisfy { MacOS::CLT.installed? }
|
T.cast(self, PourBottleCheck).satisfy { MacOS::CLT.installed? }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
when :default_prefix
|
||||||
|
lambda do |_|
|
||||||
|
T.cast(self, PourBottleCheck).reason(+<<~EOS)
|
||||||
|
The bottle needs to be installed into #{Homebrew::DEFAULT_PREFIX}.
|
||||||
|
EOS
|
||||||
|
T.cast(self, PourBottleCheck).satisfy { HOMEBREW_PREFIX.to_s == Homebrew::DEFAULT_PREFIX }
|
||||||
|
end
|
||||||
else
|
else
|
||||||
raise ArgumentError, "Invalid preset `pour_bottle?` condition" if only_if.present?
|
raise ArgumentError, "Invalid preset `pour_bottle?` condition" if only_if.present?
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user