aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorXu Cheng2015-10-17 03:57:40 +0800
committerXu Cheng2015-10-17 03:57:40 +0800
commitdee4c76e6257a71672e259c0ae1e3e5c62b86e78 (patch)
tree03591073afdbd2cf72b60b1d7cd7d58622ab6fbf /Library/Homebrew/cmd
parentf81d561b67e2188b7fdd1cbb782cba00db08af2e (diff)
downloadbrew-dee4c76e6257a71672e259c0ae1e3e5c62b86e78.tar.bz2
uninstall: fix when Cellar doesn't exist
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/uninstall.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb
index 0dbdc08c4..f1d0ea636 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)