Don't attempt to walk nonexistent directories
Fixes Homebrew/homebrew#11298. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
2e2a492045
commit
472322af24
@ -183,6 +183,7 @@ def check_for_broken_symlinks
|
||||
broken_symlinks = []
|
||||
%w[lib include sbin bin etc share].each do |d|
|
||||
d = HOMEBREW_PREFIX/d
|
||||
next unless d.directory?
|
||||
d.find do |pn|
|
||||
broken_symlinks << pn if pn.symlink? and pn.readlink.expand_path.to_s =~ /^#{HOMEBREW_PREFIX}/ and not pn.exist?
|
||||
end
|
||||
|
||||
@ -10,6 +10,7 @@ module Homebrew extend self
|
||||
dirs = []
|
||||
|
||||
%w[bin sbin etc lib include share Library/LinkedKegs].map{ |d| HOMEBREW_PREFIX+d }.each do |path|
|
||||
next unless path.directory?
|
||||
path.find do |path|
|
||||
path.extend ObserverPathnameExtension
|
||||
if path.symlink?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user