Don't link_dir if the target doesn't exist.

Fixes Homebrew/homebrew#1115 for Ruby 1.9, thanks to assaf.
This commit is contained in:
Adam Vandenberg 2010-04-04 13:45:02 -07:00
parent d2b2ecbd0b
commit fb9f4bbccc

View File

@ -80,6 +80,7 @@ protected
# symlinks the contents of self+foo recursively into /usr/local/foo
def link_dir foo
root = self+foo
return unless root.exist?
root.find do |src|
next if src == root