From 5d0c99575a85fd8f5e2b2fb8c49974905b3a249a Mon Sep 17 00:00:00 2001 From: Andor Date: Mon, 14 Feb 2022 20:02:41 +0100 Subject: [PATCH] Issue #1097 - ProgressIndicator uses the stdError (#1101) --- src/Common/ProgressIndicator.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Common/ProgressIndicator.php b/src/Common/ProgressIndicator.php index 1da42a6df..a183b9d75 100644 --- a/src/Common/ProgressIndicator.php +++ b/src/Common/ProgressIndicator.php @@ -2,6 +2,8 @@ namespace Robo\Common; +use Symfony\Component\Console\Output\ConsoleOutputInterface; + /** * Wrapper around \Symfony\Component\Console\Helper\ProgressBar */ @@ -56,7 +58,9 @@ class ProgressIndicator public function __construct($progressBar, \Symfony\Component\Console\Output\OutputInterface $output) { $this->progressBar = $progressBar; - $this->output = $output; + $this->output = $output instanceof ConsoleOutputInterface ? + $output->getErrorOutput() + : $output; } /**