From 46e051b1c2ed44ce4db151da9a09a1870c485334 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 4 Feb 2017 21:53:02 +0100 Subject: [PATCH] Simplify cache output. --- Library/Homebrew/cask/lib/hbc/cli/doctor.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/cask/lib/hbc/cli/doctor.rb b/Library/Homebrew/cask/lib/hbc/cli/doctor.rb index 7b777abbbb..acf584bfd2 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/doctor.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/doctor.rb @@ -106,13 +106,11 @@ module Hbc def self.render_cached_downloads cleanup = CLI::Cleanup.default - files = cleanup.cache_files - count = files.count + count = cleanup.cache_files.count size = cleanup.disk_cleanup_size - size_msg = "#{number_readable(count)} files, #{disk_usage_readable(size)}" - warn_msg = error_string('warning: run "brew cask cleanup"') - size_msg << " #{warn_msg}" if count > 0 - [Hbc.cache, size_msg] + msg = user_tilde(Hbc.cache.to_s) + msg << " (#{number_readable(count)} files, #{disk_usage_readable(size)})" unless count.zero? + msg end def self.help