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

Drush aliases not read from sites/all/drush/site-aliases/whatever.aliases.drushrc.php #661

Closed
dixhuit opened this issue May 25, 2016 · 8 comments

Comments

@dixhuit
Copy link
Contributor

dixhuit commented May 25, 2016

Drush aliases stored in the project at sites/all/drush/site-aliases/whatever.aliases.drushrc.php should get automatically picked up by Drush but they don't. It doesn't appear to be an issue with Drush itself as this is working fine in Vlad with Drush 8.1.0.

Tested with Drupal VM 3.0.0, drush master, 8.x, & 8.1.0. Setting configure_local_drush_aliases to true or false makes no difference.

@dixhuit
Copy link
Contributor Author

dixhuit commented May 25, 2016

Just tested storing an aliases file at drush/site-aliases/whatever.aliases.drushrc.php too and that also doesn't work. From the sound of this comment that did work very recently.

@oxyc
Copy link
Collaborator

oxyc commented May 25, 2016

What directory are you running the drush command from? Are you using the default structure of:

.
├── Vagrantfile
├── config.yml
├── docroot
│   ├── index.php
│   ├── sites/all/drush/site-aliases/whatever.aliases.drushrc.php
 ...

@dixhuit
Copy link
Contributor Author

dixhuit commented May 25, 2016

Currently, the structure I'm using looks more like:

.
├── docroot
│   ├── index.php
│   ├── sites/all/drush/site-aliases/whatever.aliases.drushrc.php
│   └── other D7 project stuff...
└── drupal-vm
    ├── Vagrantfile
    ├── config.yml
    ├── provisioning
    └── other Drupal VM repo stuff...
  • local_path is configured with the full path to that docroot location.
  • destination has been left as the default value /var/www/drupalvm.
  • I'm testing this by running drush sa once I've SSHd into the guest so the path would be /home/vagrant.
  • I've just noticed that if I try to cd to /var/www/drupalvm the shell just hangs - not sure if related but doesn't seem right.

@oxyc
Copy link
Collaborator

oxyc commented May 25, 2016

If you use site specific aliases they are only available within that project dir. So you can only see them if you cd /var/www/drupalvm/docroot/ (edit: note that they cant even be found in /var/www/drupalvm unless you add a .drush-wrapper script pointing to drush and the aliases)

@dixhuit
Copy link
Contributor Author

dixhuit commented May 25, 2016

That would explain it, I wasn't aware of that restriction and I'm likely too used to Vlad cd-ing me into the web root as soon as I ssh into the guest.

Now I just need to figure out why cd /var/www/drupalvm/docroot/ hangs...

@dixhuit
Copy link
Contributor Author

dixhuit commented May 25, 2016

So I re-provisioned and the shell no longer hangs when I try to cd any deeper than /var/. Now that I can finally cd to /var/www/drupalvm/docroot/ I can confirm that my site aliases are indeed available when I run drush sa - no need for a .drush-wrapper script as mentioned above.

@dixhuit dixhuit closed this as completed May 25, 2016
@oxyc
Copy link
Collaborator

oxyc commented May 25, 2016

Glad you got it working! The wrapper is only needed if you want to issue drush commands outside of docroot/.

@dixhuit
Copy link
Contributor Author

dixhuit commented May 25, 2016

Aaah, gotcha now. Thanks for your help :)

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