aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2017-04-01 16:33:24 +0100
committerMike McQuaid2017-04-01 16:33:24 +0100
commit82858176f0c7cc6264e7557066133371aebdb885 (patch)
tree4bfdd119e3c8583317d2601ddeac6c84f3b33165 /Library/Homebrew
parent1ea44788cb1e2526317fe3bba16167d491115e77 (diff)
downloadbrew-82858176f0c7cc6264e7557066133371aebdb885.tar.bz2
keg: correctly remove alias symlinks.
Fixes #2427.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/keg.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index cb9cd9113..d4b9c5d77 100644
--- a/Library/Homebrew/keg.rb
+++ b/Library/Homebrew/keg.rb
@@ -240,8 +240,9 @@ class Keg
def remove_opt_record
opt_record.unlink
aliases.each do |a|
- next if !opt_record.symlink? && !opt_record.exist?
- (opt_record.parent/a).delete
+ alias_symlink = opt_record.parent/a
+ next if !alias_symlink.symlink? && !alias_symlink.exist?
+ alias_symlink.delete
end
opt_record.parent.rmdir_if_possible
end