mirror of
https://github.com/gosticks/brew.git
synced 2026-10-04 22:46:55 +00:00
formula: deprecate installed_prefix and installed_version
This commit is contained in:
@@ -16,6 +16,22 @@ class Formula
|
||||
|
||||
super
|
||||
end
|
||||
|
||||
def installed_prefix
|
||||
# TODO: deprecate for Homebrew 2.5
|
||||
# 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
|
||||
# TODO: deprecate for Homebrew 2.5
|
||||
# odeprecated "Formula#installed_version"
|
||||
Keg.new(latest_installed_prefix).version
|
||||
end
|
||||
end
|
||||
|
||||
prepend Compat
|
||||
|
||||
@@ -559,13 +559,6 @@ class Formula
|
||||
end
|
||||
end
|
||||
|
||||
# The currently installed version for this formula. Will raise an exception
|
||||
# if the formula is not installed.
|
||||
# @private
|
||||
def installed_version
|
||||
Keg.new(latest_installed_prefix).version
|
||||
end
|
||||
|
||||
# The directory in the cellar that the formula is installed to.
|
||||
# This directory points to {#opt_prefix} if it exists and if #{prefix} is not
|
||||
# called from within the same formula's {#install} or {#post_install} methods.
|
||||
|
||||
Reference in New Issue
Block a user