Mike McQuaid 2c2b7ef2a6 compat/formula: re-add super.
I missed the `respond_to?(:patches)` here which broke patches.
2020-09-03 13:28:22 +01:00

37 lines
963 B
Ruby

# frozen_string_literal: true
class Formula
module Compat
def installed?
odisabled "Formula#installed?",
"Formula#latest_version_installed? (or Formula#any_version_installed? )"
end
def prepare_patches
odisabled "patches", "patch do" if respond_to?(:patches)
super
end
def installed_prefix
odeprecated "Formula#installed_prefix",
"Formula#latest_installed_prefix (or Formula#any_installed_prefix)"
latest_installed_prefix
end
# The currently installed version for this formula. Will raise an exception
# if the formula is not installed.
# @private
def installed_version
odeprecated "Formula#installed_version"
Keg.new(latest_installed_prefix).version
end
def opt_or_installed_prefix_keg
odeprecated "Formula#opt_or_installed_prefix_keg", "Formula#any_installed_keg"
any_installed_keg
end
end
prepend Compat
end