formula: reject dot dirs as racks

Dot directories are not racks because formulae names do not start with
"." so avoid attempting to descend into dot directories, which may not
always be possible (e.g. .Trashes).
This commit is contained in:
ilovezfs 2018-01-19 15:07:04 -08:00
parent d14fd49b30
commit f818f0e681

View File

@ -1371,7 +1371,7 @@ class Formula
def self.racks
@racks ||= if HOMEBREW_CELLAR.directory?
HOMEBREW_CELLAR.subdirs.reject do |rack|
rack.symlink? || rack.subdirs.empty?
rack.symlink? || rack.basename.to_s.start_with?(".") || rack.subdirs.empty?
end
else
[]