Permalink
Browse files

Prevent linkapps from creating duplicate aliases

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

Closes #14955.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information...
1 parent 97a98cd commit 6ee607c47e909fb8092934e60f78a622bde767b4 @docwhat docwhat committed with adamv Sep 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Library/Contributions/cmds/brew-linkapps.rb
@@ -32,7 +32,7 @@ def create_finder_alias(from, to)
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."

0 comments on commit 6ee607c

Please sign in to comment.