Skip to content

Commit

Permalink
Merge pull request Homebrew#16593 from jawshooah/quiet-cleanup-when-n…
Browse files Browse the repository at this point in the history
…o-cache

Don't output cleanup size if no files removed
  • Loading branch information
jawshooah committed Jan 8, 2016
2 parents 82d48b3 + 846ff35 commit d90248a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/hbc/cli/cleanup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ def self.help
end

def self.run(*_ignored)
disk_space = Hbc::Utils.disk_usage_readable(default.disk_cleanup_size)
cleanup_size = default.disk_cleanup_size
default.cleanup!
return unless cleanup_size > 0
disk_space = Hbc::Utils.disk_usage_readable(cleanup_size)
ohai "This operation has freed approximately #{disk_space} of disk space."
end

Expand Down

0 comments on commit d90248a

Please sign in to comment.