Permalink
Browse files

[init] Add site option. (#330)

  • Loading branch information...
jmolivas committed Mar 6, 2018
1 parent 55c84a9 commit 086865cc79e6afc965ea5787c523db5f6d96cbd9
Showing with 20 additions and 0 deletions.
  1. +17 −0 src/Command/InitCommand.php
  2. +3 −0 templates/core/init/config.yml.twig
@@ -102,6 +102,12 @@ protected function configure()
InputOption::VALUE_OPTIONAL,
$this->trans('commands.init.options.destination')
)
->addOption(
'site',
null,
InputOption::VALUE_NONE,
$this->trans('commands.init.options.site')
)
->addOption(
'override',
null,
@@ -122,9 +128,14 @@ protected function configure()
protected function interact(InputInterface $input, OutputInterface $output)
{
$destination = $input->getOption('destination');
$site = $input->getOption('site');
$autocomplete = $input->getOption('autocomplete');
$configuration = $this->configurationManager->getConfiguration();
if ($site && $this->appRoot && $this->consoleRoot) {
$destination = $this->consoleRoot . '/console/';
}
if (!$destination) {
if ($this->appRoot && $this->consoleRoot) {
$destination = $this->getIo()->choice(
@@ -190,8 +201,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
{
$copiedFiles = [];
$destination = $input->getOption('destination');
$site = $input->getOption('site');
$autocomplete = $input->getOption('autocomplete');
$override = $input->getOption('override');
if ($site && $this->appRoot && $this->consoleRoot) {
$destination = $this->consoleRoot . '/console/';
}
if (!$destination) {
$destination = $this->configurationManager->getConsoleDirectory();
}
@@ -13,6 +13,9 @@ application:
config: 'true'
chains: 'true'
mappings: 'true'
overrides:
config:
skip-validate-site-uuid: true
remote:
port: '22'
user: 'drupal'

0 comments on commit 086865c

Please sign in to comment.