From 65488903f9a10a8b5bbf39a13eaf9a40a789ca5b Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sun, 27 Sep 2015 15:57:37 +0800 Subject: [PATCH] add Formula.core_alias_files --- Library/Homebrew/formula.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 4edc6ec9aa..fb274533e3 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