beetboxvm / beetbox

Pre-provisioned L*MP stack
http://beetbox.rtfd.org
92 stars 19 forks source link

Beetbox D8 drush aliases using wrong root #459

Closed joshuaboltz closed 6 years ago

joshuaboltz commented 6 years ago

Problem/Motivation

After running vagrant up while running a Beetbox VM locally, I see the drush alias file it created for me.

Upon running the drush command drush @mysite.local cr, I get errors, such as: [ERROR] SQLSTATE[HY000] [2002] Connection refused

That's because when Beetbox configures the alias, it has the wrong root value: 'root' => '/var/beetbox',

If I change it to this, it then works properly: 'root' => '/var/beetbox/web',

And if i make changes to config.yml to add an extra or update memory, after running vagrant provision or vagrant reload --provision, the drush alias file gets updated and the root value is back to the old, non-working value.

Expected behaviour

The value should be: 'root' => '/var/beetbox/web', Especially for Drupal 8. Maybe this causes issues for D7 builds though.

Proposed changes

After vagrant provision, the drush alias file should not be updated to use the wrong root location.

thom8 commented 6 years ago

@joshuaboltz the easiest way to fix this is to this to your config beet_web: {{ beet_base }}/web

https://github.com/beetboxvm/beetbox/blob/master/Vagrantfile#L219

The other option is to disable the auto alias generation and add aliases to the drush directory in the root of the project.

Also just note that this will need some changes for drush 9 as aliases have been refactored.