add Formula#installed_prefixes and Formula#installed_kegs
This commit is contained in:
parent
b31f84f270
commit
6273d464ee
@ -436,6 +436,18 @@ class Formula
|
||||
prefix.parent
|
||||
end
|
||||
|
||||
# All of current installed prefix directories.
|
||||
# @private
|
||||
def installed_prefixes
|
||||
rack.directory? ? rack.subdirs : []
|
||||
end
|
||||
|
||||
# All of current installed kegs.
|
||||
# @private
|
||||
def installed_kegs
|
||||
installed_prefixes.map { |dir| Keg.new(dir) }
|
||||
end
|
||||
|
||||
# The directory where the formula's binaries should be installed.
|
||||
# This is symlinked into `HOMEBREW_PREFIX` after installation or with
|
||||
# `brew link` for formulae that are not keg-only.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user