From f3619134c28b0b734936374a262b5c94d67d7267 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 20 Jan 2022 12:21:56 +0000 Subject: [PATCH] cleanup: check if symlinks are readable. --- Library/Homebrew/cleanup.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cleanup.rb b/Library/Homebrew/cleanup.rb index 782d8447be..88c8c85a8d 100644 --- a/Library/Homebrew/cleanup.rb +++ b/Library/Homebrew/cleanup.rb @@ -489,7 +489,7 @@ module Homebrew dir.find do |path| path.extend(ObserverPathnameExtension) 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? if dry_run?