Prevent linkapps from creating duplicate aliases

`brew linkapps` was creating `MacVim` on the first run, then
`MacVim alias` on the second run.

Closes Homebrew/homebrew#14955.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Christian Höltje 2012-09-15 09:47:04 -04:00 committed by Adam Vandenberg
parent e8c372a315
commit d56957d2f8

View File

@ -32,7 +32,7 @@ HOMEBREW_CELLAR.subdirs.each do |keg|
appname = File.basename(p, ".app")
target = HOME_APPS+"/"+appname
if File.exist? target
if File.symlink? target or finder_alias? target
if File.symlink?(target) || finder_alias?(target)
system "rm", target
else
onoe "#{target} already exists, skipping."