Skip to content

Commit

Permalink
Issue #1097 - ProgressIndicator uses the stdError (#1101)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sweetchuck authored Feb 14, 2022
1 parent 1daaeae commit 5d0c995
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Common/ProgressIndicator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Robo\Common;

use Symfony\Component\Console\Output\ConsoleOutputInterface;

/**
* Wrapper around \Symfony\Component\Console\Helper\ProgressBar
*/
Expand Down Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 5d0c995

Please sign in to comment.