Skip to content

Commit 086865c

Browse files
authored
[init] Add site option. (#330)
1 parent 55c84a9 commit 086865c

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/Command/InitCommand.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ protected function configure()
102102
InputOption::VALUE_OPTIONAL,
103103
$this->trans('commands.init.options.destination')
104104
)
105+
->addOption(
106+
'site',
107+
null,
108+
InputOption::VALUE_NONE,
109+
$this->trans('commands.init.options.site')
110+
)
105111
->addOption(
106112
'override',
107113
null,
@@ -122,9 +128,14 @@ protected function configure()
122128
protected function interact(InputInterface $input, OutputInterface $output)
123129
{
124130
$destination = $input->getOption('destination');
131+
$site = $input->getOption('site');
125132
$autocomplete = $input->getOption('autocomplete');
126133
$configuration = $this->configurationManager->getConfiguration();
127134

135+
if ($site && $this->appRoot && $this->consoleRoot) {
136+
$destination = $this->consoleRoot . '/console/';
137+
}
138+
128139
if (!$destination) {
129140
if ($this->appRoot && $this->consoleRoot) {
130141
$destination = $this->getIo()->choice(
@@ -190,8 +201,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
190201
{
191202
$copiedFiles = [];
192203
$destination = $input->getOption('destination');
204+
$site = $input->getOption('site');
193205
$autocomplete = $input->getOption('autocomplete');
194206
$override = $input->getOption('override');
207+
208+
if ($site && $this->appRoot && $this->consoleRoot) {
209+
$destination = $this->consoleRoot . '/console/';
210+
}
211+
195212
if (!$destination) {
196213
$destination = $this->configurationManager->getConsoleDirectory();
197214
}

templates/core/init/config.yml.twig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ application:
1313
config: 'true'
1414
chains: 'true'
1515
mappings: 'true'
16+
overrides:
17+
config:
18+
skip-validate-site-uuid: true
1619
remote:
1720
port: '22'
1821
user: 'drupal'

0 commit comments

Comments
 (0)