Merge pull request #4643 from chrmoritz/gclient_cache_cleanup

add new gclient_cache folder to cleanup
This commit is contained in:
Dominyk Tiller 2018-08-13 23:18:46 +01:00 committed by GitHub
commit 7307d2558f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -36,7 +36,7 @@ module CleanupRefinement
end end
def nested_cache? def nested_cache?
directory? && ["glide_home", "java_cache", "npm_cache"].include?(basename.to_s) directory? && %w[glide_home java_cache npm_cache gclient_cache].include?(basename.to_s)
end end
def prune?(days) def prune?(days)

View File

@ -252,6 +252,15 @@ describe Homebrew::Cleanup do
expect(npm_cache).not_to exist expect(npm_cache).not_to exist
end end
it "cleans up 'gclient_cache'" do
gclient_cache = (HOMEBREW_CACHE/"gclient_cache")
gclient_cache.mkpath
subject.cleanup_cache
expect(gclient_cache).not_to exist
end
it "cleans up all files and directories" do it "cleans up all files and directories" do
git = (HOMEBREW_CACHE/"gist--git") git = (HOMEBREW_CACHE/"gist--git")
gist = (HOMEBREW_CACHE/"gist") gist = (HOMEBREW_CACHE/"gist")