diff options
| author | Markus Reiter | 2016-10-02 20:39:43 +0200 | 
|---|---|---|
| committer | Markus Reiter | 2016-10-15 17:13:38 +0200 | 
| commit | 198bf4d3bdeaf3047f9af80788ea18cd192541af (patch) | |
| tree | 613f8ec02a60b15ff12bb981d75759d54dbbee3c /Library/Homebrew/cask/lib | |
| parent | 429327cac8b75118087400fc9b5ffed4c4ce83ec (diff) | |
| download | brew-198bf4d3bdeaf3047f9af80788ea18cd192541af.tar.bz2 | |
Convert `puts_columns` to `puts Formatter.columns`.
Diffstat (limited to 'Library/Homebrew/cask/lib')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/install.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/list.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/search.rb | 2 | 
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  | 
