cleanup: don’t cleanup periodic clean file.

Cleaning up this file means that cleanup will run again prematurely.
This commit is contained in:
Mike McQuaid 2019-04-17 21:06:47 +09:00
parent 4d6de005d8
commit 0b272ad26e
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -300,6 +300,8 @@ module Homebrew
entries ||= [cache, cache/"Cask"].select(&:directory?).flat_map(&:children)
entries.each do |path|
next if path == PERIODIC_CLEAN_FILE
FileUtils.chmod_R 0755, path if path.go_cache_directory? && !dry_run?
next cleanup_path(path) { path.unlink } if path.incomplete?
next cleanup_path(path) { FileUtils.rm_rf path } if path.nested_cache?