Merge pull request #4037 from MikeMcQuaid/keg-unlink-no-remove-old-aliases

keg: don't remove versioned aliases on unlink.
This commit is contained in:
Mike McQuaid 2018-04-08 16:13:42 -07:00 committed by GitHub
commit 65651b373f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -243,6 +243,8 @@ class Keg
end
aliases.each do |a|
# versioned aliases are handled below
next if a =~ /.+@./
alias_symlink = opt/a
if alias_symlink.symlink? && alias_symlink.exist?
alias_symlink.delete if alias_symlink.realpath == opt_record.realpath
@ -252,7 +254,7 @@ class Keg
end
Pathname.glob("#{opt_record}@*").each do |a|
a = a.basename
a = a.basename.to_s
next if aliases.include?(a)
alias_symlink = opt/a