- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
sql:sync uses wrong drush script when both sites are local. #5041
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
Comments
Thanks. Even a quick bug report is helpful.
|
Thanks for a quick response.
|
Full verbose logs might be helpful in debugging these. No rush. |
The stack trace looks like a dependency hell problem. Have you installed a site-local Drush, or are you using a global install? It is expected that a global install of Drush 10 with Drupal 8 would break if you upgraded to a global install of Drush 11. |
Idea: Maybe we should have our error handler print out a warning message if Drush's vendor != Drupal's vendor. Might even be worth making new releases of Drush 9 and Drush 10 to get this diagnostic info (presuming that folks upgrade). |
Thanks for the comments.
Drush is site-local installed with composer. |
OK I think I have figured it out. Both problems seem to have the same cause which is use of the wrong drush executable. In
So if the two sites are at different drush versions then we have classic dependency hell. If they are the same version it's more mysterious, but somehow running the wrong drush has doubled up the output. It works if I set paths.drush-script or if I hack the code to look for vendor in the parent directory. I propose the following fixes:
|
It's a really good idea, except that the problems I came across might mean we are running from the wrong vendor unexpectedly. So maybe we would need to port fixes to those problems back to older drush versions too? |
|
PR at #5093 |
Great thanks |
Sorry this isn't a full bug report as I ran out of time and had to revert to drush 10 to get the sites back working (at which point it all worked again as normal). I would appreciate if someone else could report if it works for them.
drush core-status --fields=db-name --format=json
is mysteriously doubled when run from thedatabaseName()
function. It was correct when I ran the command manually.The text was updated successfully, but these errors were encountered: