search: fix repositories with formulae and casks.

e.g. Caskroom/homebrew-cask.

Thanks to UniqMartin for the fix.

Fixes #655.
This commit is contained in:
Mike McQuaid 2016-08-08 09:25:34 +01:00
parent 9d8c4e6279
commit 850db4ebf4

View File

@ -143,7 +143,8 @@ module Homebrew
end end
end end
paths = tree["Formula"] || tree["HomebrewFormula"] || tree["Casks"] || tree["."] || [] paths = tree["Formula"] || tree["HomebrewFormula"] || tree["."] || []
paths += tree["Casks"] || []
cache[key] = paths.map { |path| File.basename(path, ".rb") } cache[key] = paths.map { |path| File.basename(path, ".rb") }
end end