From e97c16f498fe52c4e2fbfc1428c886c1c3cc5179 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Mon, 11 Jan 2010 09:07:53 -0800 Subject: [PATCH] Fixes Homebrew/homebrew#433 --- Library/Homebrew/formula.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 9fe276ad30..a9d8a61df7 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -38,7 +38,8 @@ end class Formulary # Returns all formula names as strings, with or without aliases def self.names with_aliases=false - everything = (HOMEBREW_REPOSITORY+'Library/Formula').children.map{|f| f.basename('.rb').to_s } + filenames = (HOMEBREW_REPOSITORY+'Library/Formula').children.select {|f| f.to_s =~ /\.rb$/ } + everything = filenames.map{|f| f.basename('.rb').to_s } everything.push *Formulary.get_aliases.keys if with_aliases everything.sort end