diff --git a/src/Command/Config/ExportCommand.php b/src/Command/Config/ExportCommand.php index 55bf80460..4eaf63ab9 100644 --- a/src/Command/Config/ExportCommand.php +++ b/src/Command/Config/ExportCommand.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} */ diff --git a/src/Command/Config/ImportCommand.php b/src/Command/Config/ImportCommand.php index c068536e5..c5211852d 100644 --- a/src/Command/Config/ImportCommand.php +++ b/src/Command/Config/ImportCommand.php @@ -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} */