Don’t show Casks on Linux.

This commit is contained in:
Markus Reiter 2018-06-11 22:24:41 +02:00
parent a8bfe09c49
commit 1d629c6978
2 changed files with 4 additions and 2 deletions

View File

@ -83,7 +83,9 @@ module Homebrew
remote_formulae = remote_results[:formulae]
all_formulae = local_formulae + remote_formulae
local_casks = if query.match?(HOMEBREW_TAP_CASK_REGEX)
local_casks = if !OS.mac?
[]
elsif query.match?(HOMEBREW_TAP_CASK_REGEX)
begin
[Hbc::CaskLoader.load(query).token]
rescue Hbc::CaskUnavailableError

View File

@ -25,7 +25,7 @@ describe "brew search", :integration_test do
.and be_a_success
end
it "falls back to a GitHub tap search when no formula is found", :needs_macos, :needs_network, retry: 3 do
it "falls back to a GitHub tap search when no formula is found", :needs_network, retry: 3 do
setup_remote_tap "homebrew/cask"
expect { brew "search", "homebrew/cask/firefox" }