From f93fd970d59c097a7bc55ba88ccdb90cd68a845b Mon Sep 17 00:00:00 2001 From: Nath Tumlin Date: Sat, 11 Mar 2017 15:20:24 -0800 Subject: [PATCH] Speed up checking if cask is installed in search Switched from loading a cask and checking the installed? variable to checking for it in the caskroom directory like search does outside cask --- Library/Homebrew/cask/lib/hbc/utils.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Library/Homebrew/cask/lib/hbc/utils.rb b/Library/Homebrew/cask/lib/hbc/utils.rb index ef00104f92..fd786e318f 100644 --- a/Library/Homebrew/cask/lib/hbc/utils.rb +++ b/Library/Homebrew/cask/lib/hbc/utils.rb @@ -37,8 +37,7 @@ def odebug(title, *sput) end def highlight_installed(token) - cask = Hbc.load(token) - if cask.installed? + if (Hbc.caskroom/token).directory? token = pretty_installed token end token