1
0
Fork 0

Merge branch '2.0'

pull/9897/head
Jordi Boggiano 2021-05-17 22:35:56 +02:00
commit 5bf614a762
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 12 additions and 2 deletions

View File

@ -451,12 +451,22 @@ class InstallationManager
private function waitOnPromises(array $promises)
{
$progress = null;
if ($this->outputProgress && $this->io instanceof ConsoleIO && !$this->io->isDebug() && count($promises) > 1) {
if (
$this->outputProgress
&& $this->io instanceof ConsoleIO
&& !getenv('CI')
&& !$this->io->isDebug()
&& count($promises) > 1
) {
$progress = $this->io->getProgressBar();
}
$this->loop->wait($promises, $progress);
if ($progress) {
$progress->clear();
// ProgressBar in non-decorated output does not output a final line-break and clear() does nothing
if ($this->io->isDecorated()) {
$this->io->writeError('');
}
}
}

View File

@ -108,7 +108,7 @@ class Loop
// as we skip progress updates if they are too quick, make sure we do one last one here at 100%
if ($progress) {
$progress->setProgress($progress->getMaxSteps());
$progress->finish();
}
unset($this->currentPromises[$waitIndex]);