Skip to content

Document that global Drush 8 can detect Drush 12 in a local Drupal 10 installation #5741

@gitressa

Description

@gitressa

Existing document

https://github.com/drush-ops/drush-launcher was recently archived. On the project page, it says:

Add ./vendor/bin to the front of your $PATH. This relative path works for any Drupal codebase on your system if you run commands from the project root. And it is harmless otherwise. Other options include direnv, fd, or the scripts drush-ops/drush-launcher#105.

What are you attempting to do
I have both a non-Composer Drupal 7 installations with a globally installed Drush 8, and a Composer-run Drupal 10 with local Drush 12 concurrently on the same server. These two Drush versions actually seem to work well together, even without Drush Launcher, as discovered by @gisle in which drush for Drupal 10.1.2 on debian 10. Drush 8 will detect that Drush 12 is available in a Drupal 10 installation. This is great news, and should be documented.

In what way is the existing documentation unclear or incomplete
Currently, it looks like you might need to replace drush-launcher with some advanced configuration, if you want to run Drush 8 and Drush 12 on the same server, but this doesn't seem necessary.

What should the documentation say instead?
We could update the introduction, by adding a sentence that the above set up is possible, and works without any extra efforts. Suggestion:

Add ./vendor/bin to the front of your $PATH. This relative path works for any Drupal codebase on your system if you run commands from the project root. And it is harmless otherwise.
You can run a non-Composer Drupal 7 installations with a globally installed Drush 8, and a Composer-run Drupal 10 with local Drush 12 concurrently on the same server. Drush will automagically detect which Drush version to use, according to from where the command is run.
Other options include direnv, fd, or the scripts drush-ops/drush-launcher#105.

This is just a rough draft, but let's try to figure out a good wording, and document this great feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions