test-bot: try to handle bad UTF-8 output.

This commit is contained in:
Mike McQuaid 2015-04-29 12:57:13 +01:00
parent ba26567b03
commit ee0a553021

View File

@ -838,6 +838,11 @@ module Homebrew
end
if ARGV.include? "--junit"
unless RUBY_VERSION < "1.9"
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
end
xml_document = REXML::Document.new
xml_document << REXML::XMLDecl.new
testsuites = xml_document.add_element "testsuites"