1
0
Fork 0

Disable TTY mode if STDOUT is not a TTY, fixes #9454

pull/9461/head
Jordi Boggiano 2020-11-11 14:27:17 +01:00
parent 00dfd2c8e1
commit 1496277697
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 7 additions and 0 deletions

View File

@ -77,6 +77,13 @@ class ProcessExecutor
*/
public function executeTty($command, $cwd = null)
{
if (
(function_exists('stream_isatty') && !stream_isatty(STDOUT))
|| (function_exists('posix_isatty') && !posix_isatty(STDOUT))
) {
return $this->doExecute($command, $cwd, false);
}
return $this->doExecute($command, $cwd, true);
}