Skip to content

Commit

Permalink
Fixes #1355: Make Drush alias for 'local' work in VM guest or host by…
Browse files Browse the repository at this point in the history
… default. (#1356)

* Fixes #1355: Make Drush alias for 'local' work in VM guest or host by default.

* Issue #1355: Clean up comments in Drupal VM aliases file.
  • Loading branch information
geerlingguy authored and grasmash committed Apr 11, 2017
1 parent 457a220 commit 54fddbe
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions scripts/drupal-vm/drupal-vm.aliases.drushrc.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// [vagrant_machine_name].local
// Local environment.
$aliases['${project.machine_name}.local'] = array(
// /var/www/[vagrant_machine_name]/docroot
'root' => '/var/www/${project.machine_name}/docroot',
// vagrant_hostname
'uri' => '${project.local.uri}',
// vagrant_hostname
'remote-host' => '${project.local.hostname}',
'remote-user' => 'vagrant',
'ssh-options' => '-o PasswordAuthentication=no -i ' . drush_server_home() . '/.vagrant.d/insecure_private_key'
);
);
// Add remote connection options when alias is used outside VM.
if ('vagrant' != $_SERVER['USER']) {
$aliases['${project.machine_name}.local'] += array(
'remote-host' => '${project.local.hostname}',
'remote-user' => 'vagrant',
'ssh-options' => '-o PasswordAuthentication=no -i ' . drush_server_home() . '/.vagrant.d/insecure_private_key'
);
}

0 comments on commit 54fddbe

Please sign in to comment.