From f762033a57be271b778be6e39fe7d5b9d068ec64 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 14 Oct 2019 11:22:26 +0200 Subject: [PATCH] Move condition to nested `if` statement. --- Library/Homebrew/cmd/search.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb index 057ec8faaa..73861036ad 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -100,10 +100,10 @@ module Homebrew puts Formatter.columns(all_casks) end - if $stdout.tty? && !local_casks.include?(query) + if $stdout.tty? count = all_formulae.count + all_casks.count - if reason = MissingFormula.reason(query, silent: true) + if reason = MissingFormula.reason(query, silent: true) && !local_casks.include?(query) if count.positive? puts puts "If you meant #{query.inspect} specifically:"