aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorXu Cheng2015-06-16 14:58:47 +0800
committerXu Cheng2015-06-16 16:08:52 +0800
commit0e3c11ea07e84616266602aaa9e4adcb24773fc8 (patch)
tree59551cf745b559a8ca13cb82bc5ba76e44184d74 /Library/Homebrew/cmd
parent1e867302891f04ba7857d86ea641315d2e1c8e4d (diff)
downloadbrew-0e3c11ea07e84616266602aaa9e4adcb24773fc8.tar.bz2
doctor: use Formula.installed directly
Before ``` brew doctor 9.83s user 0.52s system 76% cpu 13.563 total ``` After ``` brew doctor 0.25s user 0.16s system 9% cpu 4.332 total ``` Closes Homebrew/homebrew#40770. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/doctor.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 55ebcd0ff..2be9f18e0 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -927,8 +927,8 @@ end
def check_for_linked_keg_only_brews
return unless HOMEBREW_CELLAR.exist?
- linked = Formula.select { |f|
- f.keg_only? && f.installed? && __check_linked_brew(f)
+ linked = Formula.installed.select { |f|
+ f.keg_only? && __check_linked_brew(f)
}
unless linked.empty?