From 87383420163c9f0960ef498bc2c1e46101e4da52 Mon Sep 17 00:00:00 2001 From: Michael Carman Date: Tue, 11 Feb 2014 07:59:52 -0600 Subject: [PATCH] Apply color to STDERR instead of STDOUT on Win32 Output wasn't colored on Win32 because the colors were being applied to STDOUT but the text to color (especially failures) appears on STDERR. --- lib/TAP/Formatter/Color.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/TAP/Formatter/Color.pm b/lib/TAP/Formatter/Color.pm index d22752e1..4cfe239c 100644 --- a/lib/TAP/Formatter/Color.pm +++ b/lib/TAP/Formatter/Color.pm @@ -18,7 +18,7 @@ BEGIN { $NO_COLOR = $@; } else { - my $console = Win32::Console->new( STD_OUTPUT_HANDLE() ); + my $console = Win32::Console->new( STD_ERROR_HANDLE() ); # eval here because we might not know about these variables my $fg = eval '$FG_LIGHTGRAY';