Merge pull request #4954 from alebcay/prune

prune: preserve some directories
This commit is contained in:
Mike McQuaid 2018-09-23 15:29:55 +01:00 committed by GitHub
commit 27c2a0a0b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,8 @@ module Homebrew
path.unlink
end
end
elsif path.directory? && !Keg::PRUNEABLE_DIRECTORIES.include?(path)
elsif path.directory? && !Keg::PRUNEABLE_DIRECTORIES.include?(path) &&
!Keg::MUST_BE_WRITABLE_DIRECTORIES.include?(path)
dirs << path
end
end