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

Issue #2285: Fix detecting sites other than default when a site-local drush is installed. #2286

Closed
wants to merge 1 commit into from

Conversation

fago
Copy link
Contributor

@fago fago commented Jul 21, 2016

See issue #2285 for details.

@PatrickBauer
Copy link
Contributor

Patch works, BUT only on our macOS machines, not on our linux machines. May that help find the bug?

@fago
Copy link
Contributor Author

fago commented Jan 25, 2017

This is strange, because it works fine for me on ubuntu 14.04 and 16.04 machines. With which environmments did this not work?

@BR0kEN-
Copy link

BR0kEN- commented Jul 31, 2017

It works and should work everywhere. We definitely must not change the directory because otherwise, we're going outside from the site directory. Another solution - is to restore the previous CWD back in this particular condition.

Can someone reopen this PR?

@rthideaway
Copy link

This PR helped me today to resolve the issue with multi-site setup.

@weitzman weitzman reopened this Feb 1, 2018
@wizonesolutions
Copy link

This patch unfortunately doesn't fix it in my case. I applied it with composer-patches to 8.1.15.

Output:

Using the Drush script found at /var/www/snip/vendor/drush/drush/drush.launcher using pcntl_exec
Cache HIT cid: 8.1.15-commandfiles-0-cdccfef3916688a1fa0f7c91bff6d932 [0.01 sec, 3.78 MB]     [debug]
Loading drushrc "/var/www/site/drush/drushrc.php" into "drupal" scope. [0.06 sec,  [bootstrap]
6.62 MB]
Undefined variable: app_root sites.php:80 [0.14 sec, 8.6 MB]                                 [notice]
Undefined variable: app_root sites.php:80 [0.15 sec, 8.61 MB]                                [notice]
Bootstrap to phase 0. [0.16 sec, 8.61 MB]                                                 [bootstrap]
Trying to bootstrap as far as we can. [0.16 sec, 8.62 MB]                                     [debug]
Drush bootstrap phase : bootstrap_drupal_root() [0.16 sec, 8.77 MB]                       [bootstrap]
Loading drushrc "/var/www/site/drush/drushrc.php" into "drupal" scope. [0.16 sec,  [bootstrap]
8.77 MB]
Initialized Drupal 8.3.9 root directory at /var/www/site/docroot [0.17 sec, 8.78   [bootstrap]
MB]
Find command files for phase 1 (max=7) [0.17 sec, 7.59 MB]                                    [debug]
Cache HIT cid: 8.1.15-commandfiles-1-34406d7a08ff0be1db1d53ef3b8bc56b [0.17 sec, 7.59 MB]     [debug]
Cache HIT cid: 8.1.15-annotationfiles-1-cda80632736fc13cc1919d2772efa1a8 [0.17 sec, 7.69      [debug]
MB]
Undefined variable: app_root sites.php:80 [0.17 sec, 7.69 MB]                                [notice]
Undefined variable: app_root sites.php:80 [0.17 sec, 7.69 MB]                                [notice]
Undefined variable: app_root sites.php:80 [0.2 sec, 7.7 MB]                                  [notice]
Undefined variable: app_root sites.php:80 [0.2 sec, 7.71 MB]                                 [notice]
Undefined variable: app_root sites.php:80 [0.2 sec, 7.71 MB]                                 [notice]
Undefined variable: app_root sites.php:80 [0.2 sec, 7.71 MB]                                 [notice]
Bootstrap phase bootstrap_drupal_site() failed to validate; continuing at                     [debug]
bootstrap_drupal_root(). [0.2 sec, 8.33 MB]
Found command: core-status (commandfile=core) [0.21 sec, 8.33 MB]                         [bootstrap]
Loading outputformat engine. [0.26 sec, 9.61 MB]                                             [notice]
Calling hook drush_core_status [0.27 sec, 9.82 MB]                                            [debug]
Undefined variable: app_root sites.php:80 [0.27 sec, 9.82 MB]                                [notice]
Returned from hook drush_core_status [0.29 sec, 9.83 MB]                                      [debug]

I'm running drush st from within a multisite directory.

@weitzman
Copy link
Member

weitzman commented May 7, 2018

Fixed #3550

@weitzman weitzman closed this May 7, 2018
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

Successfully merging this pull request may close these issues.

6 participants