[Console] Avoided an unnecessary check.
It only makes sense to do the second check if the --no-interaction option was not passed. Running posix_isatty() raises a warning with some stream types (like MEMORY). With this patch, warning could be avoided by passing the --no-interaction option.
This commit is contained in:
parent
b76a6fc72c
commit
e46fd4e8fa
|
@ -859,9 +859,7 @@ class Application
|
|||
|
||||
if (true === $input->hasParameterOption(array('--no-interaction', '-n'))) {
|
||||
$input->setInteractive(false);
|
||||
}
|
||||
|
||||
if (function_exists('posix_isatty') && $this->getHelperSet()->has('dialog')) {
|
||||
} elseif (function_exists('posix_isatty') && $this->getHelperSet()->has('dialog')) {
|
||||
$inputStream = $this->getHelperSet()->get('dialog')->getInputStream();
|
||||
if (!posix_isatty($inputStream)) {
|
||||
$input->setInteractive(false);
|
||||
|
|
Reference in New Issue