aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorXu Cheng2015-08-01 00:02:19 +0800
committerXu Cheng2015-08-01 00:49:50 +0800
commitac738ae2cd713e3cf836407730324b9ccc7e747a (patch)
treee048bf6e24fe386313144790666a8839f298136c /Library/Homebrew/cmd
parentaa28226423dcc77220f98d0b3cd888b63899462c (diff)
downloadbrew-ac738ae2cd713e3cf836407730324b9ccc7e747a.tar.bz2
enumerate all formulae by files rather than names
Before ``` $ time brew readall brew readall 10.63s user 0.36s system 99% cpu 11.003 total ``` After ``` $ time brew readall brew readall 5.62s user 0.24s system 99% cpu 5.859 total ``` Closes Homebrew/homebrew#42302. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/readall.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/readall.rb b/Library/Homebrew/cmd/readall.rb
index 0714c18b1..a89b700f9 100644
--- a/Library/Homebrew/cmd/readall.rb
+++ b/Library/Homebrew/cmd/readall.rb
@@ -32,18 +32,18 @@ module Homebrew
formulae = []
if ARGV.named.empty?
- formulae = Formula.full_names
+ formulae = Formula.files
else
tap = Tap.new(*tap_args)
raise TapUnavailableError, tap.name unless tap.installed?
formulae = tap.formula_files
end
- formulae.sort.each do |n|
+ formulae.each do |file|
begin
- Formulary.factory(n)
+ Formulary.factory(file)
rescue Exception => e
- onoe "problem in #{Formulary.path(n)}"
+ onoe "problem in #{file}"
puts e
Homebrew.failed = true
end