aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/utils.rb
diff options
context:
space:
mode:
authorAnastasiaSulyagina2016-08-23 09:11:09 +0300
committerAnastasiaSulyagina2016-08-23 23:44:45 +0300
commit65579f27dd905e4026bb514f60e875cfc41cc368 (patch)
tree987493e2627feb20b5d94a6e08d770940218dcb6 /Library/Homebrew/cask/lib/hbc/utils.rb
parent0dbf485c4fc19663ba1eeb6fbe62be9c378a305c (diff)
downloadbrew-65579f27dd905e4026bb514f60e875cfc41cc368.tar.bz2
cask tty removed
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/utils.rb')
-rw-r--r--Library/Homebrew/cask/lib/hbc/utils.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/utils.rb b/Library/Homebrew/cask/lib/hbc/utils.rb
index 6fc52cc93..e151b0c1e 100644
--- a/Library/Homebrew/cask/lib/hbc/utils.rb
+++ b/Library/Homebrew/cask/lib/hbc/utils.rb
@@ -5,7 +5,6 @@ require "open3"
require "stringio"
require "hbc/utils/file"
-require "hbc/utils/tty"
UPDATE_CMD = "brew uninstall --force brew-cask; brew untap phinze/cask; brew untap caskroom/cask; brew update; brew cleanup; brew cask cleanup".freeze
ISSUES_URL = "https://github.com/caskroom/homebrew-cask#reporting-bugs".freeze
@@ -34,11 +33,11 @@ end
def odebug(title, *sput)
if Hbc.respond_to?(:debug) && Hbc.debug
- width = Hbc::Utils::Tty.width * 4 - 6
+ width = Tty.width * 4 - 6
if $stdout.tty? && title.to_s.length > width
title = title.to_s[0, width - 3] + "..."
end
- puts "#{Hbc::Utils::Tty.magenta.bold}==>#{Hbc::Utils::Tty.reset.bold} #{title}#{Hbc::Utils::Tty.reset}"
+ puts "#{Tty.magenta}==> #{title}#{Tty.reset}"
puts sput unless sput.empty?
end
end
@@ -151,14 +150,13 @@ module Hbc::Utils
def self.error_message_with_suggestions
<<-EOS.undent
- #{Hbc::Utils::Tty.reset.bold}
Most likely, this means you have an outdated version of Homebrew-Cask. Please run:
- #{Hbc::Utils::Tty.green.normal}#{UPDATE_CMD}
+ #{Tty.green}#{UPDATE_CMD}
- #{Hbc::Utils::Tty.reset.bold}If this doesn’t fix the problem, please report this bug:
+ #{Tty.reset}If this doesn’t fix the problem, please report this bug:
- #{Hbc::Utils::Tty.underline}#{ISSUES_URL}#{Hbc::Utils::Tty.reset}
+ #{Tty.em}#{ISSUES_URL}#{Tty.reset}
EOS
end