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 <>
  • Loading branch information...
1 parent e72ccbd commit 613de6a99c3ad38a9ca5418980ac3455f30a6501 @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
onoe "#{target} already exists, skipping."

0 comments on commit 613de6a

Please sign in to comment.