Skip to content
Permalink
Browse files

[config:import | config:export] Added interactive mode (#4097)

* [update:execute] Fixed update table

* Revert "Merge remote-tracking branch 'upstream/master'"

This reverts commit ddf7739, reversing
changes made to a95b7e6.

* [config:import | config:export] Added interative mode
  • Loading branch information...
harold20 authored and enzolutions committed Jun 21, 2019
1 parent 9adfcba commit 02498e822ae533da3e1255ef4f79424765bdc890
Showing with 33 additions and 6 deletions.
  1. +19 −6 src/Command/Config/ExportCommand.php
  2. +14 −0 src/Command/Config/ImportCommand.php
@@ -56,12 +56,6 @@ protected function configure()
null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.config.export.options.directory')
)
->addOption(
'tar',
null,
InputOption::VALUE_NONE,
$this->trans('commands.config.export.options.tar')
)->addOption(
'remove-uuid',
null,
@@ -72,10 +66,29 @@ protected function configure()
null,
InputOption::VALUE_NONE,
$this->trans('commands.config.export.options.remove-config-hash')
)->addOption(
'tar',
null,
InputOption::VALUE_NONE,
$this->trans('commands.config.export.options.tar')
)
->setAliases(['ce']);
}
/**
* {@inheritdoc}
*/
protected function interact(InputInterface $input, OutputInterface $output)
{
if (!$input->getOption('directory')) {
$directory = $this->getIo()->ask(
$this->trans('commands.config.export.questions.directory'),
config_get_config_directory(CONFIG_SYNC_DIRECTORY)
);
$input->setOption('directory', $directory);
}
}
/**
* {@inheritdoc}
*/
@@ -79,6 +79,20 @@ protected function configure()
->setAliases(['ci']);
}
/**
* {@inheritdoc}
*/
protected function interact(InputInterface $input, OutputInterface $output)
{
if (!$input->getOption('directory')) {
$directory = $this->getIo()->ask(
$this->trans('commands.config.import.questions.directory'),
config_get_config_directory(CONFIG_SYNC_DIRECTORY)
);
$input->setOption('directory', $directory);
}
}
/**
* {@inheritdoc}
*/

0 comments on commit 02498e8

Please sign in to comment.
You can’t perform that action at this time.