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

main
Jordi Boggiano 4 years ago
parent 00dfd2c8e1
commit 1496277697
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -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);
}

Loading…
Cancel
Save