diff --git a/core/lib/Drupal/Core/Command/DbDumpCommand.php b/core/lib/Drupal/Core/Command/DbDumpCommand.php index 4002729..a050137 100644 --- a/core/lib/Drupal/Core/Command/DbDumpCommand.php +++ b/core/lib/Drupal/Core/Command/DbDumpCommand.php @@ -69,6 +69,11 @@ protected function configure() { * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { + // If not explicitly set, disable ANSI which will break generated php. + if ($input->hasParameterOption(['--ansi']) !== TRUE) { + $output->setDecorated(FALSE); + } + $output->writeln($this->generateScript()); }