uninstall: fix when Cellar doesn't exist

This commit is contained in:
Xu Cheng 2015-10-17 03:57:40 +08:00
parent f81d561b67
commit dee4c76e62

View File

@ -46,9 +46,11 @@ module Homebrew
ensure
# If we delete Cellar/newname, then Cellar/oldname symlink
# can become broken and we have to remove it.
if HOMEBREW_CELLAR.directory?
HOMEBREW_CELLAR.children.each do |rack|
rack.unlink if rack.symlink? && !rack.resolved_path_exists?
end
end
end
def rm_pin(rack)