drush-launcher icon indicating copy to clipboard operation
drush-launcher copied to clipboard

Support for global aliases?

Open cgmonroe opened this issue 5 years ago • 2 comments

It would be nice if the launcher would support commands with Drush 9+ aliases from any directory.

Suppose you have ~/.drush/drush.yml and ~/.drush/sites/self.site.yml files set up. The self.site.yml file has a mysite alias with path and url defined. You should be able to drush @alias commands from any directory.

E.g. in the home directory: % drush @mysite status or drush @mysite cr

The launcher should be able to find the drush command associated with the aliased site.

Currently without a fallback (which may or may not be the correct drush version) you get the can't find the Drupal site message.

Sometimes you need to run a command without changing directories.

Extra credit here :) would be to allow for a launcher-drush-script: path tag in the alias yml for remote site aliases. This would allow the proper local version of drush to be associated with the remote site. E.g. add this setting to define the correct drush version related to an acquia site alias setting.

You can achieve some of this with the fallback env variable but it would be much cleaner / much more controllable if this was built in.

cgmonroe avatar Oct 07 '20 16:10 cgmonroe

Perhaps this is a dupe of #2?

weitzman avatar Oct 07 '20 17:10 weitzman

Hmm, similar especially the extra credit part. The main thought here was not to support the actual remote call but to just have a finer grained way to link to the required drush command. I.e locally to use the drush-alias library to find the root path and then use that to find the drush command needed. Basically, if there is an alias the cwd should be the root path setting.

cgmonroe avatar Oct 07 '20 17:10 cgmonroe