aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 67f2f9f93..b65600893 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -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.