From 8e70c1cab07ac641b885ce80385b9824a293c623 Mon Sep 17 00:00:00 2001 From: aleksandr-shevchenko Date: Wed, 19 Oct 2022 09:15:51 +0400 Subject: [PATCH] Update Application.php https://github.com/symfony/symfony/issues/47862#issuecomment-1282195961 --- Application.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Application.php b/Application.php index 64f5ae71c..42c4911a0 100644 --- a/Application.php +++ b/Application.php @@ -254,7 +254,9 @@ public function doRun(InputInterface $input, OutputInterface $output) $alternative = $alternatives[0]; $style = new SymfonyStyle($input, $output); - $style->block(sprintf('Command "%s" is not defined.', $name), null, 'error', ' ', true); + $output->writeln(''); + $formattedBlock = (new FormatterHelper())->formatBlock(sprintf('Command "%s" is not defined.', $name), 'error', true); + $output->writeln($formattedBlock); if (!$style->confirm(sprintf('Do you want to run "%s" instead? ', $alternative), false)) { if (null !== $this->dispatcher) { $event = new ConsoleErrorEvent($input, $output, $e);