From 964ca2fdbb41d43042c7fdd4933dcbfcfaac502b Mon Sep 17 00:00:00 2001 From: Tom Corrigan Date: Wed, 30 May 2018 11:25:21 +1000 Subject: [PATCH] Avoid producing invalid xml output The change introduced in 5811f411e1a6e6a0eddf0c8cee8a37148190079d prepends 'Analysis queued' at the beginning of `stdout`. When piping this to a pmd file per the instructions at http://blog.insight.sensiolabs.com/2014/02/12/jenkins-integration.html invalid xml is produced. The fix here is to direct the initial output to `stderr` instead. --- Cli/Command/AnalyzeCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cli/Command/AnalyzeCommand.php b/Cli/Command/AnalyzeCommand.php index c4bf964..d7ca9b7 100644 --- a/Cli/Command/AnalyzeCommand.php +++ b/Cli/Command/AnalyzeCommand.php @@ -41,7 +41,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $chars = array('-', '\\', '|', '/'); $noAnsiStatus = 'Analysis queued'; - $output->writeln($noAnsiStatus); + $output->getErrorOutput()->writeln($noAnsiStatus); $position = 0;