aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2010-01-18 08:19:29 +0000
committerMax Howell2010-01-18 08:34:07 +0000
commitf5960ccd9e041b0342907a1f4271a3e950306290 (patch)
tree20b9355ea5e9adb583331186a7d54c460405dcf7
parent8585a7598e8ee015a52b60168e385601adc6c40e (diff)
downloadhomebrew-f5960ccd9e041b0342907a1f4271a3e950306290.tar.bz2
Use Ruby rather than external commands
`ls` could go wrong more than Pathname.children
-rwxr-xr-xbin/brew4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/brew b/bin/brew
index 9c0a34c29..39b2325f5 100755
--- a/bin/brew
+++ b/bin/brew
@@ -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}