From bb8d92c3cf360a91688e943ceb5151366fe7af52 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 22 Mar 2012 10:32:46 +0000 Subject: [PATCH] Check tapped before trying to untap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the tap-formula wasn't symlinked for some reason, don't throw an exception—the job is already done. --- Library/Homebrew/cmd/untap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/untap.rb b/Library/Homebrew/cmd/untap.rb index e1529c2884..148e96448d 100644 --- a/Library/Homebrew/cmd/untap.rb +++ b/Library/Homebrew/cmd/untap.rb @@ -31,7 +31,7 @@ module Homebrew extend self bn = formula.basename.to_s pn = HOMEBREW_LIBRARY/"Formula/#{bn}" - if pn.symlink? and pn.realpath.to_s =~ %r[^#{tapd}] + if pn.symlink? and (!pn.exist? or pn.realpath.to_s =~ %r[^#{tapd}]) pn.delete gitignores.delete(bn) untapped += 1