Skip to content

Commit

Permalink
backup + security CLI commands not styling colors Fixes #3198
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Feb 2, 2021
1 parent 02e41ae commit a376c37
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions system/src/Grav/Console/Cli/BackupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ protected function serve(): int

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'];
Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Console/Cli/SecurityCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected function serve(): int

/** @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);

Expand Down

0 comments on commit a376c37

Please sign in to comment.