Skip to content

Commit ea11dfa

Browse files
committed
Bugfix on long CLI output
1 parent 1b84d93 commit ea11dfa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Cli/IO.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,12 @@ private static function safeWrite(string|array $messages): void
210210

211211
self::$spinner?->clear();
212212

213+
// For some reason Symfony's Output truncates long strings, this happens with `bref command`
214+
// when the resulting output is very long. To avoid this, we split the string into multiple lines.
215+
if (is_string($messages)) {
216+
$messages = explode(PHP_EOL, $messages);
217+
}
218+
213219
self::$output->writeln($messages);
214220

215221
// Render the spinner again

0 commit comments

Comments
 (0)