Skip to content

Commit

Permalink
added check before setting tty
Browse files Browse the repository at this point in the history
  • Loading branch information
azeemhassni committed May 22, 2017
1 parent f750894 commit 6b232fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/WPCli.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6b232fd

Please sign in to comment.