You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have multiple local Drupal installations with site aliases. When I run a drush command for another site, I get the error message "[preflight] The alias @ references a Drupal site that does not contain its own copy of Drush. Please add Drush to this site to use it."
To Reproduce
Setup two Drupal installations on the same server and install drush on both of them.
Define site aliases for the two installations
cd into the first installation and then run for example drush @<other-site-alias> status
You will now get the message "[preflight] The alias @ references a Drupal site that does not contain its own copy of Drush. Please add Drush to this site to use it."
Expected behavior
The message should not be displayed as Drush is installed on both sites.
Actual behavior
The message is displayed, indicating that Drush needs to be installed on the other site even though it is already installed.
System Configuration
Q
A
Drush version?
12.x (latest dev release)
Drupal version?
10.0.9
PHP version
8.1
OS?
Linux
Additional information
I dug around in the code and found some weird return types/values which seem to be causing this issue so I created a potential fix that I will include with this issue.
The text was updated successfully, but these errors were encountered:
#5687)
* #5686 Fix issue "Drush installation is not detected for other site alias when having multiple local Drupal installations with aliases"
* Change return type to array
* Use phpstan array shapes to define complex return type
* Use constant for exit status
---------
Co-authored-by: Kristofer Tengström <info@kristofer-tengstrom.se>
Describe the bug
I have multiple local Drupal installations with site aliases. When I run a drush command for another site, I get the error message "[preflight] The alias @ references a Drupal site that does not contain its own copy of Drush. Please add Drush to this site to use it."
To Reproduce
drush @<other-site-alias> status
Expected behavior
The message should not be displayed as Drush is installed on both sites.
Actual behavior
The message is displayed, indicating that Drush needs to be installed on the other site even though it is already installed.
System Configuration
Additional information
I dug around in the code and found some weird return types/values which seem to be causing this issue so I created a potential fix that I will include with this issue.
The text was updated successfully, but these errors were encountered: