diff --git a/src/Command/CheckCommand.php b/src/Command/CheckCommand.php index 7222c0c..c953d36 100644 --- a/src/Command/CheckCommand.php +++ b/src/Command/CheckCommand.php @@ -2,6 +2,7 @@ namespace DrupalCheck\Command; +use DrupalCheck\Util\Tty; use DrupalFinder\DrupalFinder; use Nette\Neon\Neon; use PHPStan\ShouldNotHappenException; @@ -211,7 +212,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $command = array_merge($command, $paths); $process = new Process($command); - $process->setTty(true); + $process->setTty(Tty::isTtySupported()); $process->setTimeout(null); $process->run(static function ($type, $buffer) use ($output) { if (Process::ERR === $type) { diff --git a/src/Util/Tty.php b/src/Util/Tty.php new file mode 100644 index 0000000..e217ce8 --- /dev/null +++ b/src/Util/Tty.php @@ -0,0 +1,28 @@ +/dev/null', array(array('file', '/dev/tty', 'r'), array('file', '/dev/tty', 'w'), array('file', '/dev/tty', 'w')), $pipes); + } +}