Skip to content

Commit

Permalink
Fix progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
brendt committed May 30, 2024
1 parent b1636b8 commit 6b5e97b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Components/Interactive/ProgressBarComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function render(): Generator
$bar,
$step,
$count,
) . PHP_EOL;
);
};

foreach ($this->data as $item) {
Expand Down
8 changes: 5 additions & 3 deletions src/Terminal/Terminal.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ public function render(
}

foreach ($rendered as $content) {
$footerLinesForContent = $footerLines;

if ($footer = $component->renderFooter()) {
$footerLines[] = $footer;
$footerLinesForContent[] = $footer;
}

if ($footerLines !== []) {
$content .= PHP_EOL . PHP_EOL . implode(PHP_EOL, $footerLines);
if ($footerLinesForContent !== []) {
$content .= PHP_EOL . PHP_EOL . implode(PHP_EOL, $footerLinesForContent);
}

$this
Expand Down

0 comments on commit 6b5e97b

Please sign in to comment.