diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index 192df31a0..cc7f61d9a 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -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); }