From 11a6413fd01dfb83d59aeb7c242f16cf7e37d6b6 Mon Sep 17 00:00:00 2001 From: commitay Date: Mon, 3 Sep 2018 18:59:53 +1000 Subject: [PATCH] cleanup: remove cargo_cache --- Library/Homebrew/cleanup.rb | 2 +- Library/Homebrew/test/cleanup_spec.rb | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cleanup.rb b/Library/Homebrew/cleanup.rb index e88aff4076..852b6126bb 100644 --- a/Library/Homebrew/cleanup.rb +++ b/Library/Homebrew/cleanup.rb @@ -36,7 +36,7 @@ module CleanupRefinement end def nested_cache? - directory? && %w[go_cache glide_home java_cache npm_cache gclient_cache].include?(basename.to_s) + directory? && %w[cargo_cache go_cache glide_home java_cache npm_cache gclient_cache].include?(basename.to_s) end def go_cache_directory? diff --git a/Library/Homebrew/test/cleanup_spec.rb b/Library/Homebrew/test/cleanup_spec.rb index 18c0c9e51a..b4f4de58d0 100644 --- a/Library/Homebrew/test/cleanup_spec.rb +++ b/Library/Homebrew/test/cleanup_spec.rb @@ -225,6 +225,15 @@ describe Homebrew::Cleanup do expect(incomplete).not_to exist end + it "cleans up 'cargo_cache'" do + cargo_cache = (HOMEBREW_CACHE/"cargo_cache") + cargo_cache.mkpath + + subject.cleanup_cache + + expect(cargo_cache).not_to exist + end + it "cleans up 'go_cache'" do go_cache = (HOMEBREW_CACHE/"go_cache") go_cache.mkpath