Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

Support for global aliases? #79

Open
cgmonroe opened this issue Oct 7, 2020 · 2 comments
Open

Support for global aliases? #79

cgmonroe opened this issue Oct 7, 2020 · 2 comments

Comments

@cgmonroe
Copy link

cgmonroe commented Oct 7, 2020

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.

@weitzman
Copy link
Member

weitzman commented Oct 7, 2020

Perhaps this is a dupe of #2?

@cgmonroe
Copy link
Author

cgmonroe commented Oct 7, 2020

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants