diff --git a/elasticms-cli/src/Client/Audit/Cache.php b/elasticms-cli/src/Client/Audit/Cache.php index 293e2c7f9..6d02193b5 100644 --- a/elasticms-cli/src/Client/Audit/Cache.php +++ b/elasticms-cli/src/Client/Audit/Cache.php @@ -170,18 +170,19 @@ public function progress(OutputInterface $output): void $estimateSeconds = \round($rate * ($total - $treated)); $estimateDatetime = new \DateTimeImmutable(\sprintf('+%s seconds', $estimateSeconds)); $dateIntervalFormat = $estimateSeconds > (24 * 60 * 60) ? '%a days %h:%I:%S' : '%h:%I:%S'; - $output->write(\sprintf('%d urls audited, %d urls pending, %d urls found, rate %01.2f url/min, EAC in %s ', $treated, $total - $treated, $total, 60.0 / $rate, $estimateDatetime->diff(new \DateTimeImmutable())->format($dateIntervalFormat))); + $output->write(\sprintf('%d urls audited, %d urls pending, %d urls found, rate %01.2f url/min, EAC in %s', $treated, $total - $treated, $total, 60.0 / $rate, $estimateDatetime->diff(new \DateTimeImmutable())->format($dateIntervalFormat))); } public function progressFinish(OutputInterface $output, int $counter): void { $this->rewindOutput($output); - $output->writeln(\sprintf('%d/%d urls have been audited ', $counter, \count($this->urls))); + $output->writeln(\sprintf('%d/%d urls have been audited', $counter, \count($this->urls))); } protected function rewindOutput(OutputInterface $output): void { $output->write(\sprintf("\x1b[%dG", 1)); + $output->write("\x1b[2K"); } public function resume(): void