diff options
| author | Xu Cheng | 2015-09-27 15:57:37 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-10-14 17:26:41 +0800 |
| commit | 65488903f9a10a8b5bbf39a13eaf9a40a789ca5b (patch) | |
| tree | 8c40090aa85612cb75e1d171ccf128c94ad786fa /Library | |
| parent | d1222971f61b5e882571e303750da34fdee5a0cf (diff) | |
| download | brew-65488903f9a10a8b5bbf39a13eaf9a40a789ca5b.tar.bz2 | |
add Formula.core_alias_files
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 8 |
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 |
