From 85c1e5d02e9b136e25ea5a5fd0cae79ace73cbf6 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 8 Oct 2013 13:00:27 +0100 Subject: [PATCH] Revert "brew-test-bot: cleanup junit file with iconv." This reverts commit 5e26584736b310c365d4b9cce99d0dced9a2d309. --- Library/Contributions/cmd/brew-test-bot.rb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb index 0488bc24f2..f035eddefd 100755 --- a/Library/Contributions/cmd/brew-test-bot.rb +++ b/Library/Contributions/cmd/brew-test-bot.rb @@ -397,15 +397,10 @@ end if ARGV.include? "--junit" xml_erb = HOMEBREW_CONTRIBUTED_CMDS + "brew-test-bot.xml.erb" erb = ERB.new IO.read xml_erb - output_xml = 'brew-test-bot.xml' - input_xml = "#{output_xml}.in" - open("brew-test-bot.xml.in", "w") do |xml| - # Remove empty lines from ERB result. - xml.write erb.result(binding).gsub(/^\s*$\n/, '') + open("brew-test-bot.xml", "w") do |xml| + # Remove empty lines and null characters from ERB result. + xml.write erb.result(binding).gsub(/^\s*$\n|\000/, '') end - # Remove bad characters from ERB result. - `iconv -c -s -f utf8 -t utf8 #{input_xml} > #{output_xml}` - FileUtils.rm input_xml end if ARGV.include? "--email"