|
|
|
@ -2,6 +2,7 @@
|
|
|
|
|
|
|
|
|
|
namespace jrosset\CliProgram;
|
|
|
|
|
|
|
|
|
|
use jrosset\CliProgram\Output\OutputWrapper;
|
|
|
|
|
use Symfony\Component\Console\Application;
|
|
|
|
|
use Symfony\Component\Console\Command\Command;
|
|
|
|
|
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
|
|
|
@ -19,7 +20,7 @@ abstract class CliHelper {
|
|
|
|
|
* @return OutputInterface The “error” output if exists, else the output itself
|
|
|
|
|
*/
|
|
|
|
|
public static final function getErrorOutput (OutputInterface $output): OutputInterface {
|
|
|
|
|
return $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output;
|
|
|
|
|
return $output instanceof ConsoleOutputInterface || $output instanceof OutputWrapper ? $output->getErrorOutput() : $output;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|