From fb9f4bbccc640fb4b86557885e5cfdc0cb2ce743 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sun, 4 Apr 2010 13:45:02 -0700 Subject: [PATCH] Don't link_dir if the target doesn't exist. Fixes Homebrew/homebrew#1115 for Ruby 1.9, thanks to assaf. --- Library/Homebrew/keg.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index 957d9806db..3413775a9c 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -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