aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 4edc6ec9a..fb274533e 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -1022,10 +1022,16 @@ class Formula
end.compact
end
+ # an array of all alias files of core {Formula}
+ # @private
+ def self.core_alias_files
+ @core_alias_files ||= Pathname.glob("#{HOMEBREW_LIBRARY}/Aliases/*")
+ end
+
# an array of all core aliases
# @private
def self.core_aliases
- @core_aliases ||= Dir["#{HOMEBREW_LIBRARY}/Aliases/*"].map { |f| File.basename f }.sort
+ @core_aliases ||= core_alias_files.map { |f| f.basename.to_s }.sort
end
# an array of all tap aliases