Skip to content

Commit 2d89674

Browse files
authored
EZP-31930: Cleaned up output of commands displaying progress bar
Cleaned up output showing a progress bar for the following commands: * ezplatform:install * ezplatform:reindex For more details please see ezsystems/ezpublish-kernel#3070 and ezsystems/ezplatform#597
1 parent de25988 commit 2d89674

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

eZ/Bundle/EzPublishCoreBundle/Command/ReindexCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
173173
$output->writeln('Re-indexing started for search engine: ' . $this->searchIndexer->getName());
174174
$output->writeln('');
175175

176-
$return = $this->indexIncrementally($input, $output, $iterationCount, $commit);
177-
178-
$output->writeln('');
179-
$output->writeln('Finished re-indexing');
180-
181-
return $return;
176+
return $this->indexIncrementally($input, $output, $iterationCount, $commit);
182177
}
183178

184179
return 0;
@@ -257,6 +252,11 @@ protected function indexIncrementally(InputInterface $input, OutputInterface $ou
257252
}
258253

259254
$progress->finish();
255+
$output->writeln('');
256+
$output->writeln('Finished re-indexing');
257+
$output->writeln('');
258+
// clear leftover progress bar parts
259+
$progress->clear();
260260

261261
return 0;
262262
}

eZ/Bundle/PlatformInstallerBundle/src/Installer/CoreInstaller.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ public function importSchema()
8080
}
8181

8282
$progressBar->finish();
83-
// go to the next line after ProgressBar::finish
84-
$this->output->writeln('');
83+
// go to the next line after ProgressBar::finish and add one more extra blank line for readability
84+
$this->output->writeln(PHP_EOL);
85+
// clear any leftover progress bar parts in the output buffer
86+
$progressBar->clear();
8587
}
8688

8789
/**

0 commit comments

Comments
 (0)