Fix brew cleanup: less pruning

Running `brew cleanup` (with no arguments or multiple arguments) will
run `brew prune` after _every_ cleaned formula, i.e. possibly after
every installed formula.

With this change it will instead only run `prune` after all formulae are
cleaned, and only when no arguments were given to `cleanup`.

Signed-off-by: Max Howell <max@methylblue.com>

Closes Homebrew/homebrew#743
This commit is contained in:
Martin Kuehl 2010-02-16 15:41:26 +01:00 committed by Max Howell
parent 2e3585872b
commit e3a9e961bf
2 changed files with 1 additions and 2 deletions

View File

@ -262,8 +262,6 @@ def cleanup name
puts puts
end end
end end
prune # seems like a good time to do some additional cleanup
end end
def clean f def clean f

View File

@ -217,6 +217,7 @@ begin
opoo "Formula not found for #{e.name}" opoo "Formula not found for #{e.name}"
end end
end end
prune # seems like a good time to do some additional cleanup
else else
ARGV.named.each { |name| cleanup name} ARGV.named.each { |name| cleanup name}
end end