Skip to content

Commit 1308fca

Browse files
committed
Dont print errors by default
1 parent 4c36d3a commit 1308fca

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Command/BuildDocsCommand.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ protected function configure()
9191
InputOption::VALUE_NONE,
9292
'Return a non-zero code if there are errors/warnings'
9393
)
94+
->addOption(
95+
'print-errors',
96+
null,
97+
InputOption::VALUE_NONE,
98+
'Print errors when to standard output'
99+
)
94100
;
95101
}
96102

@@ -137,7 +143,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
137143
KernelFactory::createKernel($this->buildConfig, $this->urlChecker ?? null)
138144
);
139145

140-
$this->addProgressListener($builder->getConfiguration()->getEventManager());
146+
$configuration = $builder->getConfiguration();
147+
$configuration->silentOnError(!$input->getOption('print-errors'));
148+
$this->addProgressListener($configuration->getEventManager());
141149

142150
$builder->build(
143151
$this->buildConfig->getContentDir(),

0 commit comments

Comments
 (0)