From bf57ddf302be292285c8b5f00d9c305015ad7c16 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 22 Feb 2014 17:57:55 +0000 Subject: [PATCH] brew-test-bot: only cleanup cache once. --- Library/Contributions/cmd/brew-test-bot.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb index e8b20a865d..5563a55e5d 100755 --- a/Library/Contributions/cmd/brew-test-bot.rb +++ b/Library/Contributions/cmd/brew-test-bot.rb @@ -337,8 +337,6 @@ class Test @category = __method__ force_flag = '' if ARGV.include? '--cleanup' - test 'brew cleanup -s' - test "rm -vrf #{HOMEBREW_CACHE}/*" test 'git clean --force -dx' force_flag = '-f' end @@ -527,4 +525,9 @@ if ARGV.include? "--email" end end +if ARGV.include? "--cleanup" + safe_system "brew cleanup -s" + safe_system "rm -vrf #{HOMEBREW_CACHE}/*" +end + exit any_errors ? 0 : 1