Skip to content

Commit

Permalink
[config:export] Remove _core if it's empty. (#3651)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas authored Jan 7, 2018
1 parent cacaa08 commit 0b89228
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Command/Config/ExportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
if ($removeHash) {
unset($configData['_core']['default_config_hash']);
if (empty($configData['_core'])) {
unset($configData['_core']);
}
}
$ymlData = Yaml::encode($configData);

Expand All @@ -153,6 +156,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
if ($removeHash) {
unset($configData['_core']['default_config_hash']);
if (empty($configData['_core'])) {
unset($configData['_core']);
}
}

$ymlData = Yaml::encode($configData);
Expand Down

0 comments on commit 0b89228

Please sign in to comment.