This repository has been archived by the owner. It is now read-only.
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...
docwhat authored and adamv committed Sep 15, 2012
1 parent 360be75 commit e1a68f1ffbac9dc8209cc9ac2c8f2e34d11867af
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 e1a68f1

Please sign in to comment.