mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
24 lines
489 B
Ruby
24 lines
489 B
Ruby
require "requirement"
|
|
|
|
class MaximumMacOSRequirement < Requirement
|
|
fatal true
|
|
|
|
def initialize(tags)
|
|
@version = MacOS::Version.from_symbol(tags.first)
|
|
super
|
|
end
|
|
|
|
satisfy(build_env: false) { MacOS.version <= @version }
|
|
|
|
def message
|
|
<<~EOS
|
|
This formula either does not compile or function as expected on macOS
|
|
versions newer than #{@version.pretty_name} due to an upstream incompatibility.
|
|
EOS
|
|
end
|
|
|
|
def display_s
|
|
"macOS <= #{@version}"
|
|
end
|
|
end
|