aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorNath Tumlin2017-03-11 15:20:24 -0800
committerNath Tumlin2017-03-11 15:20:24 -0800
commitf93fd970d59c097a7bc55ba88ccdb90cd68a845b (patch)
tree17e6a8031aaea3da6dcf35a411cb6ceaf9eaa14a /Library/Homebrew
parentd305784c37c876d31e15d3baa842f0aa80f2f35f (diff)
downloadbrew-f93fd970d59c097a7bc55ba88ccdb90cd68a845b.tar.bz2
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
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cask/lib/hbc/utils.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/utils.rb b/Library/Homebrew/cask/lib/hbc/utils.rb
index ef00104f9..fd786e318 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