Skip to content

Commit

Permalink
#137 - Allow redirect output to a file.
Browse files Browse the repository at this point in the history
  • Loading branch information
arlina-espinoza committed May 12, 2020
1 parent 13e7895 commit 543967c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Command/CheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$command = array_merge($command, $paths);

$process = new Process($command);
$process->setTty(Tty::isTtySupported());
$process->setTimeout(null);
$process->run(static function ($type, $buffer) use ($output) {
if (Process::ERR === $type) {
$output->write($buffer, false, OutputInterface::OUTPUT_RAW);
$output->getErrorOutput()->write($buffer, false, OutputInterface::OUTPUT_RAW);
} else {
$output->writeln($buffer, OutputInterface::OUTPUT_RAW);
$output->write($buffer, false, OutputInterface::OUTPUT_RAW);
}
});
unlink($configuration);
Expand Down

0 comments on commit 543967c

Please sign in to comment.