From 2773ce6156f1d440f40e0f4d292a2eb991f22158 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 25 Aug 2018 22:06:24 +0200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20clean=20up=20symlink=20target.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library/Homebrew/cleanup.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Library/Homebrew/cleanup.rb b/Library/Homebrew/cleanup.rb index 19428d2e43..3011eee7f6 100644 --- a/Library/Homebrew/cleanup.rb +++ b/Library/Homebrew/cleanup.rb @@ -230,14 +230,7 @@ module Homebrew next cleanup_path(path) { FileUtils.rm_rf path } if path.nested_cache? if path.prune?(days) - if path.symlink? - resolved_path = path.resolved_path - - cleanup_path(path) do - resolved_path.unlink if resolved_path.exist? - path.unlink - end - elsif path.file? + if path.file? || path.symlink? cleanup_path(path) { path.unlink } elsif path.directory? && path.to_s.include?("--") cleanup_path(path) { FileUtils.rm_rf path }