From 6b232fd7fd83c2af013587450e946afe132fe43b Mon Sep 17 00:00:00 2001 From: Azeem Hassni Date: Mon, 22 May 2017 14:47:32 +0500 Subject: [PATCH] added check before setting tty --- src/WPCli.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/WPCli.php b/src/WPCli.php index 629d9ac..3e9e8d7 100644 --- a/src/WPCli.php +++ b/src/WPCli.php @@ -92,7 +92,9 @@ public function execute($command, $args = []) } $process = new Process($command); - $process->setTty(true); + if ('\\' !== DIRECTORY_SEPARATOR && file_exists('/dev/tty') && is_readable('/dev/tty')) { + $process->setTty(true); + } $process->run(); return $process;