diff --git a/Library/Homebrew/cleanup.rb b/Library/Homebrew/cleanup.rb index 5a9e870ef3..66ce77e789 100644 --- a/Library/Homebrew/cleanup.rb +++ b/Library/Homebrew/cleanup.rb @@ -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?