formula: add :default_prefix as a standard pour_bottle? requirement
See discussion at Homebrew/homebrew-core#81408.
This commit is contained in:
parent
4c3a8c7e5a
commit
1ceaa2ebd3
@ -3016,6 +3016,15 @@ 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 |_|
|
||||||
|
on_macos 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
|
||||||
|
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