Simplify cache output.

This commit is contained in:
Markus Reiter 2017-02-04 21:53:02 +01:00
parent b54c3d618e
commit 46e051b1c2

View File

@ -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