Use Ruby rather than external commands

`ls` could go wrong more than Pathname.children
This commit is contained in:
Max Howell 2010-01-18 08:19:29 +00:00
parent 248bc890f8
commit 16132cab6b

View File

@ -210,8 +210,8 @@ begin
when 'cleanup'
if ARGV.named.empty?
require 'formula'
`ls #{HOMEBREW_CELLAR}`.each do |name|
cleanup name.strip
HOMEBREW_CELLAR.children.each do |rack|
cleanup(rack.basename.to_s)
end
else
ARGV.named.each { |name| cleanup name}