Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drush relative root still not working #4069

Closed
eporama opened this issue May 10, 2019 · 2 comments
Closed

Drush relative root still not working #4069

eporama opened this issue May 10, 2019 · 2 comments

Comments

@eporama
Copy link
Contributor

eporama commented May 10, 2019

Describe the bug
On a vanilla install of Drupal-project, drush called from the project directory with a --root parameter is returning The "drush/sites" directory does not exist.

To Reproduce

$ composer create-project drupal-composer/drupal-project:8.x-dev test-drush --no-interaction
Installing drupal-composer/drupal-project (8.x-dev ec0f41171516c18357ca4cda9068ee4cdeabaa19)
  - Installing drupal-composer/drupal-project (8.x-dev ec0f411): Cloning ec0f411715 from cache
Created project in test-drush
…<snip>…

$ cd test-drush

$  vendor/bin/drush status
 Drupal version : 8.7.1
 Site URI       : http://default
 PHP binary     : /usr/local/Cellar/php@7.1/7.1.25/bin/php
 PHP config     : /usr/local/etc/php/7.1/php.ini
 PHP OS         : Darwin
 Drush script   : /private/tmp/test-drush/vendor/drush/drush/drush
 Drush version  : 9.6.2
 Drush temp     : /tmp
 Drush configs  : /private/tmp/test-drush/vendor/drush/drush/drush.yml
                  /private/tmp/test-drush/drush/drush.yml
 Drupal root    : /private/tmp/test-drush/web
 Site path      : sites/default

$  vendor/bin/drush --root=web status

In Finder.php line 547:

  The "drush/sites" directory does not exist.

$ cd web

$ ../vendor/bin/drush status --field=root
/private/tmp/test-drush/web

Expected behavior

I would expect that drush status works with --root

Actual behavior
Drush couldn't determine it's location and requires a drush/sites directory, however even if one exists, that doesn't solve the problem.

total 8
-rw-r--r--  1 myusername  wheel  342 May 10 14:19 self.site.yml

Workaround
The status works without the root if drush can automatically determine a root or if you are within the root.

System Configuration

Q A
Drush version? 9.6.2
Drupal version? 8.7.1
PHP version 7.1
OS? MacOS Mojave (10.14.4)

Additional information
Looked at #2909 and #4019 but they seem to be similar, but "fixed"

@eporama
Copy link
Contributor Author

eporama commented May 10, 2019

It does appear to be "relative" that is the issue as a full path does work:

$ vendor/bin/drush --root=/private/tmp/test-drush status --field=root
/private/tmp/test-drush/web

@eporama
Copy link
Contributor Author

eporama commented May 10, 2019

It appears that the issue is directly related to webflo/drupal-finder#40. Manually applying the patch from that issue solves this problem. Hopefully we can get a release of that soon.

@eporama eporama closed this as completed May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant