From 21bddc7972c4c7936bc02ee45378600f180bdbaa Mon Sep 17 00:00:00 2001 From: Max Howell Date: Sun, 18 Mar 2012 00:39:57 +0000 Subject: Make the tapping already there step actually work For when the symlink for a tap already exists and points to the thing we are about to symlink. This can happen, mostly because my code has sucked, but since the filesystem can be edited by the user at whim, it's possible then too. --- Library/Homebrew/cmd/tap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb index bef0dfb5b..b72837320 100644 --- a/Library/Homebrew/cmd/tap.rb +++ b/Library/Homebrew/cmd/tap.rb @@ -34,7 +34,7 @@ module Homebrew extend self to = HOMEBREW_LIBRARY.join("Formula/#{formula.basename}") # Unexpected, but possible, lets proceed as if nothing happened - formula.delete if to.symlink? and to.realpath == from + to.delete if to.symlink? and to.realpath == from # using the system ln is the only way to get relative symlinks system "ln -s ../Taps/#{formula} 2>/dev/null" -- cgit v1.2.3