From e616a23a0b5fdd97c6e0b2f98b39e02f2b0ec170 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Pla=C3=A7ais?= <thomas.placais@protonmail.com>
Date: Fri, 11 Oct 2019 22:44:52 +0100
Subject: [PATCH] Remove uneeded warning message when searching for a cask that
 was migrated from a formula

---
 Library/Homebrew/cmd/search.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb
index f8c15dcc3c..057ec8faaa 100644
--- a/Library/Homebrew/cmd/search.rb
+++ b/Library/Homebrew/cmd/search.rb
@@ -100,7 +100,7 @@ module Homebrew
         puts Formatter.columns(all_casks)
       end
 
-      if $stdout.tty?
+      if $stdout.tty? && !local_casks.include?(query)
         count = all_formulae.count + all_casks.count
 
         if reason = MissingFormula.reason(query, silent: true)
-- 
GitLab