From 36c292f2784ef1aa9abf7f93220587e1404915e2 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 2 Feb 2021 11:51:08 +0000 Subject: [PATCH] cleanup: cleanup bootsnap files. --- Library/Homebrew/cleanup.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Library/Homebrew/cleanup.rb b/Library/Homebrew/cleanup.rb index fc3554def1..47ef774cdc 100644 --- a/Library/Homebrew/cleanup.rb +++ b/Library/Homebrew/cleanup.rb @@ -209,6 +209,7 @@ module Homebrew return if periodic cleanup_portable_ruby + cleanup_bootsnap else args.each do |arg| formula = begin @@ -399,6 +400,17 @@ module Homebrew FileUtils.rm_rf portable_rubies_to_remove 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) FileUtils.rm_rf [ cache/"desc_cache.json",