Skip to content
Snippets Groups Projects
Commit 89325bbb authored by Xu Cheng's avatar Xu Cheng
Browse files

cleanup: optimize perfermance


Only remove .DS_Store files from whitelisted directories.

Closes Homebrew/homebrew#37409.

Signed-off-by: default avatarXu Cheng <xucheng@me.com>
parent 11defcf8
No related branches found
No related tags found
No related merge requests found
......@@ -111,7 +111,10 @@ module Homebrew
end
def rm_DS_Store
quiet_system "find", HOMEBREW_PREFIX.to_s, "-name", ".DS_Store", "-delete"
paths = %w[Cellar Frameworks Library bin etc include lib opt sbin share var].
map { |p| HOMEBREW_PREFIX/p }.select(&:exist?)
args = paths.map(&:to_s) + %w[-name .DS_Store -delete]
quiet_system "find", *args
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment