Skip to content

Commit

Permalink
Add option to remove or not uuid from config (#2977)
Browse files Browse the repository at this point in the history
  • Loading branch information
enzolutions authored Nov 22, 2016
1 parent 0ebc77d commit 47356e2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Command/Config/ExportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ protected function configure()
false,
InputOption::VALUE_NONE,
$this->trans('commands.config.export.arguments.tar')
)->addOption(
'remove-uuid',
'',
InputOption::VALUE_NONE,
$this->trans('commands.config.export.single.options.remove-uuid')
);
}

Expand All @@ -66,6 +71,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$directory = $input->getOption('directory');
$tar = $input->getOption('tar');
$removeUuid = $input->getOption('remove-uuid');

if (!$directory) {
$directory = config_get_config_directory(CONFIG_SYNC_DIRECTORY);
Expand Down Expand Up @@ -95,6 +101,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
// The _core is site-specific, so don't export it.
unset($configData['_core']);

if ($removeUuid) {
unset($configData['uuid']);
}

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

if ($tar) {
Expand Down

0 comments on commit 47356e2

Please sign in to comment.