Make sure the IO is not interactive when not run in a tty, refs #9454

main
Jordi Boggiano 4 years ago
parent 87006774b1
commit 380dce9a6b
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -129,7 +129,11 @@ class Application extends BaseApplication
{
$this->disablePluginsByDefault = $input->hasParameterOption('--no-plugins');
if (getenv('COMPOSER_NO_INTERACTION')) {
if (
getenv('COMPOSER_NO_INTERACTION')
|| (function_exists('stream_isatty') && !stream_isatty(STDOUT))
|| (function_exists('posix_isatty') && !posix_isatty(STDOUT))
) {
$input->setInteractive(false);
}

Loading…
Cancel
Save