Skip to content

Commit

Permalink
Prevent linkapps from creating duplicate aliases
Browse files Browse the repository at this point in the history
`brew linkapps` was creating `MacVim` on the first run, then
`MacVim alias` on the second run.

Closes Homebrew#14955.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information
docwhat authored and adamv committed Sep 15, 2012
1 parent e72ccbd commit 613de6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Contributions/cmds/brew-linkapps.rb
Expand Up @@ -32,7 +32,7 @@ def create_finder_alias(from, to)
appname = File.basename(p, ".app") appname = File.basename(p, ".app")
target = HOME_APPS+"/"+appname target = HOME_APPS+"/"+appname
if File.exist? target if File.exist? target
if File.symlink? target or finder_alias? target if File.symlink?(target) || finder_alias?(target)
system "rm", target system "rm", target
else else
onoe "#{target} already exists, skipping." onoe "#{target} already exists, skipping."
Expand Down

0 comments on commit 613de6a

Please sign in to comment.