Skip to content

Commit

Permalink
Cleaner io call in Drupal root null check
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Skrypnyk <alex@drevops.com>
  • Loading branch information
jnoordsij and AlexSkrypnyk authored Jul 2, 2024
1 parent af8d839 commit bbe78b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/composer/ScriptHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static function createRequiredFiles(Event $event) {
$drupalFinder = new DrupalFinderComposerRuntime();
$drupalRoot = $drupalFinder->getDrupalRoot();

// If Drupal root was not found, exit.
if (is_null($drupalRoot)) {
$event->getIO()->writeError('<error>Drupal root could not be detected.</error>');
exit(1);
}
if (is_null($drupalRoot)) {
$io = $event->getIO();
$io->writeError(
Expand Down

0 comments on commit bbe78b0

Please sign in to comment.