Skip to content
This repository was archived by the owner on Nov 2, 2024. It is now read-only.

Commit d7ae48b

Browse files
committed
Add a single installer-paths setting to workaround issue with drupal-finder
As seen in hussainweb/drupal-composer-helper#9 , drupal-finder relies on the installer-paths section to determine the Drupal installation location. A proper fix is suggested in webflo/drupal-finder#33 but until then, this will serve as a workaround.
1 parent a213fa7 commit d7ae48b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/DrupalInitCommand.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
127127
'web-prefix' => $web_prefix,
128128
],
129129
'enable-patching' => true,
130+
'installer-paths' => [
131+
$web_prefix . '/core' => [
132+
'type:drupal-core',
133+
],
134+
],
130135
];
131136
$options['prefer-stable'] = true;
132137
$options['conflict'] = [
@@ -150,6 +155,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
150155
$web_prefix . '/sites/all/translations',
151156
$web_prefix . '/sites/default',
152157
];
158+
$options['extra']['installer-paths'][$web_prefix . '/'] = $options['extra']['installer-paths'][$web_prefix . '/core'];
159+
unset($options['extra']['installer-paths'][$web_prefix . '/core']);
153160
}
154161

155162
$file->write($options);

0 commit comments

Comments
 (0)