test-bot: ensure cleanup is running

Closes Homebrew/homebrew#44982.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Xu Cheng 2015-10-15 15:19:12 +08:00 committed by Mike McQuaid
parent c247a5b462
commit d162aab9c6

View File

@ -746,13 +746,16 @@ module Homebrew
def run
cleanup_before
begin
download
setup
homebrew
formulae.each do |f|
formula(f)
end
ensure
cleanup_after
end
check_results
end
end
@ -1019,9 +1022,8 @@ module Homebrew
file.write email_subject
end
end
ensure
HOMEBREW_CACHE.children.each(&:rmtree) if ARGV.include? "--clean-cache"
Homebrew.failed = any_errors
end
end