update: handle realpath exception.

This commit is contained in:
Mike McQuaid 2013-09-24 23:07:01 +01:00
parent 5e13933557
commit 8d0c8fd978

View File

@ -20,7 +20,7 @@ module Homebrew extend self
tapped_formulae = Dir['Library/Formula/*'].map do |formula|
path = Pathname.new formula
next unless path.symlink?
Pathname.new(path.realpath.to_s.gsub(/.*Taps\//, ''))
Pathname.new(path.realpath.to_s.gsub(/.*Taps\//, '')) rescue nil
end
tapped_formulae.compact!
unlink_tap_formula(tapped_formulae)