Merge pull request #6024 from MikeMcQuaid/no-cleanup-periodic-file

cleanup: don’t cleanup periodic clean file.
This commit is contained in:
Mike McQuaid 2019-04-17 13:48:22 +01:00 committed by GitHub
commit b5b24be48a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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?