Skip to content

Commit

Permalink
Runtime: fix piped output rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
yannoff committed May 19, 2024
1 parent f813b24 commit 388eed8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Command/Compile.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,12 @@ protected function commentOut(string $banner): array
*/
protected function print(string $message, int $level = Verbosity::ERROR, string $tag = ''): self
{
$otag = $tag ? "<$tag>" : '';
$ctag = $tag ? "</$tag>" : '';
$this->dmesg(sprintf('%s%s%s', $otag, $message, $ctag), $level);
if ($level <= Verbosity::$level) {
$otag = $tag ? "<$tag>" : '';
$ctag = $tag ? "</$tag>" : '';!

$this->write(sprintf('%s%s%s', $otag, $message, $ctag));
}

return $this;
}
Expand Down

0 comments on commit 388eed8

Please sign in to comment.