cleanup: cleanup bootsnap files.

This commit is contained in:
Mike McQuaid 2021-02-02 11:51:08 +00:00
parent 240d2c34fb
commit 36c292f278
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -209,6 +209,7 @@ module Homebrew
return if periodic return if periodic
cleanup_portable_ruby cleanup_portable_ruby
cleanup_bootsnap
else else
args.each do |arg| args.each do |arg|
formula = begin formula = begin
@ -399,6 +400,17 @@ module Homebrew
FileUtils.rm_rf portable_rubies_to_remove FileUtils.rm_rf portable_rubies_to_remove
end end
def cleanup_bootsnap
bootsnap = cache/"bootsnap"
return unless bootsnap.exist?
if dry_run?
puts "Would remove: #{bootsnap} (#{bootsnap.abv})"
else
FileUtils.rm_rf bootsnap
end
end
def cleanup_cache_db(rack = nil) def cleanup_cache_db(rack = nil)
FileUtils.rm_rf [ FileUtils.rm_rf [
cache/"desc_cache.json", cache/"desc_cache.json",