diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php index e18dcc5ff8e..103232ca49d 100644 --- a/lib/private/Console/Application.php +++ b/lib/private/Console/Application.php @@ -96,7 +96,7 @@ class Application { try { $this->loadCommandsFromInfoXml($info['commands']); } catch (\Throwable $e) { - $output->writeln('' . $e->getMessage() . ''); + $output->getErrorOutput()->writeln('' . $e->getMessage() . ''); $this->logger->error($e->getMessage(), [ 'exception' => $e, ]); @@ -118,7 +118,7 @@ class Application { try { $this->loadCommandsFromInfoXml($info['commands']); } catch (\Throwable $e) { - $output->writeln('' . $e->getMessage() . ''); + $output->getErrorOutput()->writeln('' . $e->getMessage() . ''); $this->logger->error($e->getMessage(), [ 'exception' => $e, ]);