diff --git a/src/Handler.php b/src/Handler.php index 20bc10019639b05d8ae1affb3bc0ebeb83ad3ae5..431dc66043a831a469c1d3b7528ddccc70d6a2f6 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -85,6 +85,10 @@ class Handler { $installationManager = $this->composer->getInstallationManager(); $drupalCorePackage = $this->getDrupalCorePackage(); + if (!$drupalCorePackage) { + // We are called too early, Drupal core is not available yet. + return; + } $corePath = $installationManager->getInstallPath($drupalCorePackage); // Directory where the root project is being created