I'm trying to sync two D8 sites. Both set up with drupal composer which means that the directory structure is a bit different than usual. Composer puts drupal files inside web
sub directory like this:
/var/www/drupal8
|-- composer.json
|-- composer.lock
|-- drush
|-- scripts
|-- vendor
`-- web
|-- autoload.php
|-- core
|-- index.php
|-- modules
|-- profiles
|-- robots.txt
|-- sites
|-- themes
|-- update.php
`-- web.config
My aliases file looks like this:
<?php
$aliases["local"] = array (
'root' => '/var/www/drupal8/web/',
'uri' => 'http://local.site',
);
$aliases["remote"] = array (
'root' => '/var/www/drupal8/web/',
'uri' => 'http://site.example.com',
'remote-user' => 'dev',
'remote-host' => 'site.example.com',
);
When I do drush rsync @remote @local
I end up with all files from @remote/web
inside @local/web/web
like this:
/var/www/drupal8
|-- composer.json
|-- composer.lock
|-- drush
|-- scripts
|-- vendor
`-- web
|-- autoload.php
|-- core
|-- index.php
|-- modules
|-- profiles
|-- robots.txt
|-- sites
|-- themes
|-- update.php
|-- web
|-- autoload.php
|-- core
|-- index.php
|-- modules
|-- profiles
|-- robots.txt
|-- sites
|-- themes
|-- update.php
`-- web.config
`-- web.config
I can't edit aliases to remove web
sub dir from root
path because then drush will not work as it will complain that it needs a higher bootstrap level to run (because it won't know where is drupal root folder).
How can I instruct drush to use proper destination path for synchronisation?