Merge pull request #11237 from MikeMcQuaid/cleanup_ds_store

cleanup: ignore DS_Store access failures.
This commit is contained in:
Mike McQuaid 2021-04-23 15:45:10 +01:00 committed by GitHub
commit 58ca0f4ea7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -435,7 +435,12 @@ module Homebrew
]
dirs.select(&:directory?)
.flat_map { |d| Pathname.glob("#{d}/**/.DS_Store") }
.each(&:unlink)
.each do |dir|
dir.unlink
rescue Errno::EACCES
# don't care if we can't delete a .DS_Store
nil
end
end
def prune_prefix_symlinks_and_directories