aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/cli
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/cli')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/install.rb8
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/list.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/search.rb2
3 files changed, 7 insertions, 5 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
diff --git a/Library/Homebrew/cask/lib/hbc/cli/list.rb b/Library/Homebrew/cask/lib/hbc/cli/list.rb
index 3a993f8e6..330c81b90 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/list.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/list.rb
@@ -68,7 +68,7 @@ module Hbc
elsif @options[:versions]
puts installed_casks.map(&method(:format_versioned))
else
- puts_columns installed_casks.map(&:to_s)
+ puts Formatter.columns(installed_casks.map(&:to_s))
end
installed_casks.empty? ? nil : true
diff --git a/Library/Homebrew/cask/lib/hbc/cli/search.rb b/Library/Homebrew/cask/lib/hbc/cli/search.rb
index b671ea862..147e6d194 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/search.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/search.rb
@@ -47,7 +47,7 @@ module Hbc
else
ohai "Partial matches"
end
- puts_columns partial_matches
+ puts Formatter.columns(partial_matches)
end
end