For development, I often maintain a git clone of a module and symlink the directory into a Drupal site for testing. The init.php script fails to find Drupal root since __DIR__, is_dir(), and realpath() all "contains an absolute path with symlinks resolved"

CommentFileSizeAuthor
#3 composer_manager-symlink-2554367-2.patch891 bytesdwkitchen

Comments

cashwilliams created an issue. See original summary.

dwkitchen’s picture

Assigned: Unassigned » dwkitchen

Have the same issue, picking it up at the DrupalCon Sprint

dwkitchen’s picture

StatusFileSize
new891 bytes

Using getcwd() rather than __DIR__

dwkitchen’s picture

Assigned: dwkitchen » Unassigned
Status: Active » Needs review
bojanz’s picture

Status: Needs review » Fixed

This means the script must be run from inside the Drupal directory, but I can live with that.

Committed, thanks.

  • bojanz committed 913a995 on 8.x-1.x authored by dwkitchen
    Issue #2554367 by dwkitchen: init.php fails to find Drupal root when...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

ybabel’s picture

More over it seems (at least with 8.0-rc1) that vendor directory is now in root and not in core.
To make it work I had to change init.php

bojanz’s picture

@ybabel Sounds like you didn't use 8.x-1.x-dev, that's already fixed there.

ybabel’s picture

I didn't indeed ! Thx