jigarius / drall

A tool to run drush commands on multi-site Drupal installations.
GNU General Public License v3.0
33 stars 5 forks source link

Use by default aliased command to have correct domains #46

Closed golddragon007 closed 1 year ago

golddragon007 commented 2 years ago

When I simple give the command $ ./vendor/bin/drall exd uli I receive URLs which does not contain the domains:

Running: drush --uri=eaad uli
http://eaad/en/user/reset/1/1658916912/XtxmYUYDfYWCNDiF2Jf43DCXuQmpeNo6JbRW1NFIFhQ/login
Running: drush --uri=escaide uli
http://escaide/en/user/reset/1/1658916913/nFrSxO18O9BEHqC5E9cYO13pnJpp_2_28_qo5Ai0Rc4/login
Running: drush --uri=portal uli
http://portal/en/user/reset/1/1658916913/ugMuDeCVgV0Q5LgUJWTl7fPJ3N7lnDPebipyeVGtoeQ/login
Running: drush --uri=vaccine uli
http://vaccine/en/user/reset/1/1658916913/zzinbUGo-UrOm4izTtFtSByJqQQofUl6AHGIzIxgaMY/login

To have it correctly I need to run ./vendor/bin/drall exd @@@uri uli

Running: drush @eaad uli
http://ecdc-eaad.lh:8080/en/user/reset/1/1658916788/TpF3oxM2c5b3xuyisYbgfdzJqkBSRvNMgP27JjX4KlA/login
Running: drush @escaide uli
http://ecdc-escaide.lh:8080/en/user/reset/1/1658916789/xrZNk927t2Yalo1n3fpPrdRcMY3ZfEN9j_ylpAgjq9o/login
Running: drush @portal uli
http://ecdc-portal.lh:8080/en/user/reset/1/1658916789/gIvVSelKq1VyWkXExzQ7kjWFZ_5ZCrYcXI8FKeal6Gk/login
Running: drush @vaccine uli
http://ecdc-vaccine.lh:8080/en/user/reset/1/1658916789/NXtzQYeDinF04dF4nU5DyZR3zWMrKp-f4ZjHF4bAKDI/login

I would expect to have the correct url with the simple exd uli command too.

NOTE: here for us the @@@uri does work as the directory and the drush alias name is actually the same, otherwise it won't work.

jigarius commented 1 year ago

Indeed. Currently it just works if a URI is defined in the Drush alias. For now I'll close this ticket as the duplicate of https://github.com/jigarius/drall/issues/23 which has a similar theme.

jigarius commented 1 year ago

Try version 3.x and let me know how it goes. I think this is what will do the trick for you:

drall exec drush --uri=@@key uli

I'd suggest reading the docs about @@key and @@ukey. At this point, there seems to be no reliable way to get a site's URI from $sites.