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 <[email protected]>
  • Loading branch information
jnoordsij and AlexSkrypnyk committed Jul 2, 2024
1 parent af8d839 commit 3f0ee07
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions scripts/composer/ScriptHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ public static function createRequiredFiles(Event $event) {
$drupalFinder = new DrupalFinderComposerRuntime();
$drupalRoot = $drupalFinder->getDrupalRoot();

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

Expand Down

0 comments on commit 3f0ee07

Please sign in to comment.