Skip to content

Commit

Permalink
Merge pull request #12970 from emiliadecaudin/cleanup_total
Browse files Browse the repository at this point in the history
Show total disk space freed on cleanup.
  • Loading branch information
MikeMcQuaid authored Mar 8, 2022
2 parents ea0ddc3 + 6642801 commit 6c7dd00
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Library/Homebrew/cleanup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,13 @@ def cleanup_path(path)
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

Expand Down

0 comments on commit 6c7dd00

Please sign in to comment.