backup + security CLI commands not styling colors Fixes #3198

This commit is contained in:
Andy Miller 2021-02-02 14:36:48 -07:00
parent 02e41ae7ce
commit a376c37a91
No known key found for this signature in database
GPG Key ID: 2B07A47E470BCFDE
3 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,10 @@
# v1.7.6
## 02/dd/2021
1. [](#bugfix)
* Fixed CLI progressbar in `backup` and `security` commands to use styled output [#3198](https://github.com/getgrav/grav/issues/3198)
# v1.7.5
## 02/01/2021

View File

@ -66,9 +66,9 @@ class BackupCommand extends GravCommand
ProgressBar::setFormatDefinition('zip', 'Archiving <cyan>%current%</cyan> files [<green>%bar%</green>] <white>%percent:3s%%</white> %elapsed:6s% <yellow>%message%</yellow>');
$this->progress = $io->createProgressBar();
$this->progress = new ProgressBar($this->output, 100);
$this->progress->setFormat('zip');
$this->progress->setBarWidth(100);
/** @var Backups $backups */
$backups = Grav::instance()['backups'];

View File

@ -46,7 +46,7 @@ class SecurityCommand extends GravCommand
/** @var Grav $grav */
$grav = Grav::instance();
$this->progress = $io->createProgressBar(count($grav['pages']->routes()) - 1);
$this->progress = new ProgressBar($this->output, count($grav['pages']->routes()) - 1);
$this->progress->setFormat('Scanning <cyan>%current%</cyan> pages [<green>%bar%</green>] <white>%percent:3s%%</white> %elapsed:6s%');
$this->progress->setBarWidth(100);