diff --git a/src/Command/BuildDocsCommand.php b/src/Command/BuildDocsCommand.php index 8b7b7a6..75e5fe0 100644 --- a/src/Command/BuildDocsCommand.php +++ b/src/Command/BuildDocsCommand.php @@ -79,6 +79,12 @@ protected function configure() InputOption::VALUE_REQUIRED, 'Path where any errors should be saved' ) + ->addOption( + 'disable-parse-errors-on-stdout', + null, + InputOption::VALUE_NONE, + 'Don\'t print errors to standard output' + ) ->addOption( 'no-theme', null, @@ -137,7 +143,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int KernelFactory::createKernel($this->buildConfig, $this->urlChecker ?? null) ); - $this->addProgressListener($builder->getConfiguration()->getEventManager()); + $configuration = $builder->getConfiguration(); + $configuration->silentOnError($input->getOption('disable-parse-errors-on-stdout')); + $this->addProgressListener($configuration->getEventManager()); $builder->build( $this->buildConfig->getContentDir(),