diff --git a/Library/Homebrew/compat/formula.rb b/Library/Homebrew/compat/formula.rb index 74caf081fb..c41f9236e2 100644 --- a/Library/Homebrew/compat/formula.rb +++ b/Library/Homebrew/compat/formula.rb @@ -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 diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index f4f72c58c2..cfdaaaa579 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -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.