From 973da1774662622c1608a3707cd551148c8ca033 Mon Sep 17 00:00:00 2001 From: Nabil Muhammad Firdaus Date: Tue, 19 Nov 2019 02:06:04 +0700 Subject: [PATCH] fix: Tty not supported in windows --- src/Console/BehatCommand.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Console/BehatCommand.php b/src/Console/BehatCommand.php index 21794e2..d019b3b 100644 --- a/src/Console/BehatCommand.php +++ b/src/Console/BehatCommand.php @@ -56,7 +56,13 @@ public function handle() $this->startHttpServer(function () { $behatProcess = (new Process(array_merge( $this->binary(), $this->behatArguments($_SERVER['argv']) - )))->setTimeout(null)->setTty(true); + )))->setTimeout(null); + + try { + $behatProcess->setTty(true); + } catch (RuntimeException $e) { + $this->output->writeln('Warning: '.$e->getMessage()); + } $behatProcess->start(); $behatProcess->wait();