diff options
| author | Markus Reiter | 2016-10-02 07:57:21 +0200 |
|---|---|---|
| committer | Markus Reiter | 2016-10-15 17:13:38 +0200 |
| commit | 01d87f810721d8e8faf4b73ff5120923fa7c88ca (patch) | |
| tree | c4e9d3941758be830549b15a35b83e201b084406 /Library/Homebrew/cask/lib | |
| parent | 4bfeaaf21259637c1ad1a98b479fc0e4fdaea56e (diff) | |
| download | brew-01d87f810721d8e8faf4b73ff5120923fa7c88ca.tar.bz2 | |
Don’t use `puts_columns` if `empty?` or single item.
Diffstat (limited to 'Library/Homebrew/cask/lib')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/install.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/install.rb b/Library/Homebrew/cask/lib/hbc/cli/install.rb index 996de8d1b..1292ad076 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/install.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/install.rb @@ -42,13 +42,12 @@ module Hbc def self.warn_unavailable_with_suggestion(cask_token, e) exact_match, partial_matches = Search.search(cask_token) - errmsg = e.message if exact_match - errmsg.concat(". Did you mean:\n#{exact_match}") + onoe e.message.concat(". Did you mean:\n#{exact_match}") elsif !partial_matches.empty? - errmsg.concat(". Did you mean one of:\n#{puts_columns(partial_matches.take(20))}\n") + onoe e.message.concat(". Did you mean one of:") + $stderr.puts_columns(partial_matches.take(20)) end - onoe errmsg end def self.help |
