From dee4c76e6257a71672e259c0ae1e3e5c62b86e78 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sat, 17 Oct 2015 03:57:40 +0800 Subject: [PATCH] uninstall: fix when Cellar doesn't exist --- Library/Homebrew/cmd/uninstall.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb index 0dbdc08c4b..f1d0ea6360 100644 --- a/Library/Homebrew/cmd/uninstall.rb +++ b/Library/Homebrew/cmd/uninstall.rb @@ -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)