Skip to content

Commit

Permalink
Fix successfully generated file count.
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseleite committed Jul 13, 2023
1 parent 6c3116b commit 6eb9fa8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ protected function outputTasksResults()
{
$results = $this->taskResults;

Partyline::line("\x1B[1A\x1B[2K<info>[✔]</info> Generated {$results['count']} content files");
$successCount = $results['count'] - $results['errors']->count();

Partyline::line("\x1B[1A\x1B[2K<info>[✔]</info> Generated {$successCount} content files");

$results['warnings']->merge($results['errors'])->each(fn ($error) => Partyline::line($error));
}
Expand Down

0 comments on commit 6eb9fa8

Please sign in to comment.