Formula.racks: exclude empty rack
Fixes https://github.com/Homebrew/homebrew-bundle/issues/121 Closes Homebrew/homebrew#45879. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
4d772042f7
commit
0d74967ceb
@ -1052,7 +1052,9 @@ class Formula
|
||||
# @private
|
||||
def self.racks
|
||||
@racks ||= if HOMEBREW_CELLAR.directory?
|
||||
HOMEBREW_CELLAR.subdirs.reject(&:symlink?)
|
||||
HOMEBREW_CELLAR.subdirs.reject do |rack|
|
||||
rack.symlink? || rack.subdirs.empty?
|
||||
end
|
||||
else
|
||||
[]
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user