From 4e3c99d96ffea3eb8d791b583de7a820a4f26e1e Mon Sep 17 00:00:00 2001 From: Max Howell Date: Wed, 7 Mar 2012 17:13:37 +0000 Subject: [PATCH] Don't attempt to cleanup source checkouts Fixes Homebrew/homebrew#10751. --- Library/Homebrew/cmd/cleanup.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb index 0f2a1875d3..ba9745f1aa 100644 --- a/Library/Homebrew/cmd/cleanup.rb +++ b/Library/Homebrew/cmd/cleanup.rb @@ -50,6 +50,7 @@ module Homebrew extend self def clean_cache HOMEBREW_CACHE.children.each do |pn| + next unless pn.file? pn.stem =~ /^(.+)-(.+)$/ # greedy so works even if formula-name has hyphens in it if $1 and $2 f = Formula.factory($1) rescue nil