From d29cb450f729fc88ba045c68e3b70e86cdecfaec Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 6 Jul 2017 01:08:59 +0200 Subject: Output plain list when running `brew cask search` without a TTY. --- Library/Homebrew/cask/lib/hbc/cli/search.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Library/Homebrew/cask') diff --git a/Library/Homebrew/cask/lib/hbc/cli/search.rb b/Library/Homebrew/cask/lib/hbc/cli/search.rb index 9d1a16f15..643d18d55 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/search.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/search.rb @@ -46,6 +46,11 @@ module Hbc end def self.render_results(exact_match, partial_matches, remote_matches, search_term) + unless $stdout.tty? + puts [*exact_match, *partial_matches, *remote_matches] + return + end + if !exact_match && partial_matches.empty? puts "No Cask found for \"#{search_term}\"." return -- cgit v1.2.3