Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Apr 11, 2017
Merged

Conversation

geerlingguy
Copy link
Contributor

@geerlingguy geerlingguy commented Apr 10, 2017

Fixes #1355.

@geerlingguy
Copy link
Contributor Author

Note that this seems to work for me—get_current_user() works when I'm running on my Mac/host, but inside Drupal VM it returns empty... but I'm not sure if there's an easier/faster way to determine if we're inside a VM or not.

@lcatlett
Copy link
Contributor

@geerlingguy i've used the following for the same:

// [vagrant_machine_name].local
$aliases['${project.machine_name}.local'] = array(
  // /var/www/${project.machine_name}/docroot
  'root' => '/var/www/${project.machine_name}/docroot',
  // vagrant_hostname
  'uri' => '${project.local.uri}',
  );
if ('vagrant' != $_SERVER['USER']) {
  $aliases['${project.machine_name}.local'] += array(
    // vagrant_hostname
    'remote-host' => '${project.local.hostname}',
    'remote-user' => 'vagrant',
    'ssh-options' => '-o PasswordAuthentication=no -i ' . drush_server_home() . '/.vagrant.d/insecure_private_key'
  );
}

@geerlingguy
Copy link
Contributor Author

@lcatlett - Ooh, that could actually be better. I'll change my PR tomorrow, unless you want to build off this one or send up a new one before I get to it.

@grasmash grasmash added the Enhancement A feature or feature request label Apr 10, 2017
@geerlingguy
Copy link
Contributor Author

@lcatlett / @grasmash - rebased and updated. Looks better to me!

@grasmash grasmash merged commit 54fddbe into acquia:8.x Apr 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A feature or feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants