cleanup: check if symlinks are readable.

This commit is contained in:
Mike McQuaid 2022-01-20 12:21:56 +00:00
parent e067a5c480
commit f3619134c2
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829

View File

@ -489,7 +489,7 @@ module Homebrew
dir.find do |path| dir.find do |path|
path.extend(ObserverPathnameExtension) path.extend(ObserverPathnameExtension)
if path.symlink? if path.symlink?
unless path.resolved_path_exists? if path.readable_real? && !path.resolved_path_exists?
path.uninstall_info if path.to_s.match?(Keg::INFOFILE_RX) && !dry_run? path.uninstall_info if path.to_s.match?(Keg::INFOFILE_RX) && !dry_run?
if dry_run? if dry_run?