aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/cli/install.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/cli/install.rb')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/install.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/install.rb b/Library/Homebrew/cask/lib/hbc/cli/install.rb
index 1292ad076..3e9ce4e4f 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/install.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/install.rb
@@ -42,12 +42,14 @@ module Hbc
def self.warn_unavailable_with_suggestion(cask_token, e)
exact_match, partial_matches = Search.search(cask_token)
+ error_message = e.message
if exact_match
- onoe e.message.concat(". Did you mean:\n#{exact_match}")
+ error_message.concat(". Did you mean:\n#{exact_match}")
elsif !partial_matches.empty?
- onoe e.message.concat(". Did you mean one of:")
- $stderr.puts_columns(partial_matches.take(20))
+ error_message.concat(". Did you mean one of:\n")
+ .concat(Formatter.columns(partial_matches.take(20)))
end
+ onoe error_message
end
def self.help