Skip to content
Snippets Groups Projects
Commit 331bd0bc authored by jurgenhaas's avatar jurgenhaas
Browse files

Support non-composer based Drupal installations

parent 088565fa
No related branches found
No related tags found
No related merge requests found
......@@ -84,17 +84,25 @@ class Handler {
$fs = new Filesystem();
$installationManager = $this->composer->getInstallationManager();
$drupalCorePackage = $this->getDrupalCorePackage();
if (!$drupalCorePackage) {
// We are called too early, Drupal core is not available yet.
return;
if (isset($options['webroot'])) {
if (!$fs->exists($options['webroot'])) {
return;
}
$webRoot = $options['webroot'];
}
else {
$drupalCorePackage = $this->getDrupalCorePackage();
if (!$drupalCorePackage) {
// We are called too early, Drupal core is not available yet.
return;
}
$corePath = $installationManager->getInstallPath($drupalCorePackage);
// Directory where Drupal's index.php is located
$webRoot = dirname($corePath);
}
$corePath = $installationManager->getInstallPath($drupalCorePackage);
// Directory where the root project is being created
$projectRoot = getcwd();
// Directory where Drupal's index.php is located
$webRoot = dirname($corePath);
// Directory where this plugin is being installed
$pluginRoot = $installationManager->getInstallPath($this->getPackage('lakedrops/docker4drupal'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment