Show total disk space freed on cleanup.
This commit is contained in:
parent
ea0ddc3297
commit
6642801b04
@ -363,15 +363,13 @@ module Homebrew
|
||||
return unless path.exist?
|
||||
return unless @cleaned_up_paths.add?(path)
|
||||
|
||||
disk_usage = path.disk_usage
|
||||
@disk_cleanup_size += path.disk_usage
|
||||
|
||||
if dry_run?
|
||||
puts "Would remove: #{path} (#{path.abv})"
|
||||
@disk_cleanup_size += disk_usage
|
||||
else
|
||||
puts "Removing: #{path}... (#{path.abv})"
|
||||
yield
|
||||
@disk_cleanup_size += disk_usage - path.disk_usage
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user