From e862bcbc32a5be45481df0fded949a7dc1b8b43d Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 5 Aug 2017 18:03:04 +0100 Subject: keg: cleanup aliases correctly. This was missed when I was focused on cleaning up versioned aliases. Fixes #2992. --- Library/Homebrew/keg.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Library') diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index 8fcbecfbd..92eab7ad3 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -253,6 +253,11 @@ class Keg FileUtils.rm_rf bad_tap_opt if bad_tap_opt.directory? end + aliases.each do |a| + alias_symlink = opt/a + alias_symlink.delete if alias_symlink.symlink? || alias_symlink.exist? + end + Pathname.glob("#{opt_record}@*").each do |a| a = a.basename next if aliases.include?(a) -- cgit v1.2.3