mirror of
https://github.com/symfony/ai.git
synced 2026-03-23 23:42:18 +01:00
Hide binary output in by subprocesses in runner
This commit is contained in:
@@ -91,6 +91,9 @@ $app = (new SingleCommandApplication('Symfony AI Example Runner'))
|
||||
|
||||
$output = str_replace(PHP_EOL, ' ', $process->getOutput());
|
||||
$output = strlen($output) <= 100 ? $output : substr($output, 0, 100).'...';
|
||||
if (str_contains($output, "\0")) {
|
||||
$output = '<fg=gray>[binary output]</>';
|
||||
}
|
||||
$emptyOutput = 0 === strlen(trim($output));
|
||||
|
||||
$state = 'Running';
|
||||
|
||||
Reference in New Issue
Block a user