diff options
| author | Markus Reiter | 2017-07-24 00:04:43 +0200 |
|---|---|---|
| committer | GitHub | 2017-07-24 00:04:43 +0200 |
| commit | aa8eb21b8c650a2d0a5a060ff27507da60a17bee (patch) | |
| tree | 8a149b8cd30f43f61b6c1a5c805b106c5eb07f9d /Library/Homebrew/cask/lib | |
| parent | a947bfbf47a5d314ab689681c6ef0c42a66ec246 (diff) | |
| parent | 4e26fdfcf6922dca9a82b15697b4c76c6bf9212b (diff) | |
| download | brew-aa8eb21b8c650a2d0a5a060ff27507da60a17bee.tar.bz2 | |
Merge pull request #2861 from reitermarkus/cask-search-tty
Output plain list when running `brew cask search` without a TTY.
Diffstat (limited to 'Library/Homebrew/cask/lib')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/search.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |
