From 8c88d48af70e4d9705f0401bcddfed94db84fa83 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 5 Apr 2014 12:17:19 -0500 Subject: [PATCH] More correct "symlink already exists" check --- Library/Homebrew/keg.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index 2287df4657..521326a8ca 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -229,8 +229,8 @@ class Keg < Pathname end def make_relative_symlink dst, src, mode=OpenStruct.new - if dst.exist? and dst.realpath == src.realpath - puts "Skipping; already exists: #{dst}" if ARGV.verbose? + if dst.symlink? && dst.exist? && dst.resolved_path == src + puts "Skipping; link already exists: #{dst}" if ARGV.verbose? return end