From 3205ace13e48027d7eedddbed5acd16b83627cf9 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Mon, 20 Jul 2020 15:30:33 +0100 Subject: [PATCH] cleanup: clean go_mod_cache --- Library/Homebrew/cleanup.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cleanup.rb b/Library/Homebrew/cleanup.rb index 891e84cbfa..7c904f506d 100644 --- a/Library/Homebrew/cleanup.rb +++ b/Library/Homebrew/cleanup.rb @@ -15,13 +15,21 @@ module CleanupRefinement end def nested_cache? - directory? && %w[cargo_cache go_cache glide_home java_cache npm_cache gclient_cache].include?(basename.to_s) + directory? && %w[ + cargo_cache + go_cache + go_mod_cache + glide_home + java_cache + npm_cache + gclient_cache + ].include?(basename.to_s) end def go_cache_directory? # Go makes its cache contents read-only to ensure cache integrity, # which makes sense but is something we need to undo for cleanup. - directory? && %w[go_cache].include?(basename.to_s) + directory? && %w[go_cache go_mod_cache].include?(basename.to_s) end def prune?(days)