drush-ops/drush — pull request #546 by greg-1-anderson (2014-03-21 18:37:28+00:00)
Title: Insure that Drush will use backend_invoke() for vagrant & c.

This PR will cal through to backend_invoke() instead of executing a command locally if ssh-options are defined. c.f.: #545

This is just a quick implementation for testing. We still need to decide if we should inspect the contents of ssh-options before deciding whether the command should be local or remote.

The conflicting use case is that some folks may have Drush aliases that they share between multiple machines; in this case, Drush currently takes some pains to insure that it does not use ssh to call a "remote" site if the alias to said site is being used on the server where it is running. In other words, if 'remote-host' is set to 'foo.com', then Drush will pretend it is not set if the local machine is 'foo.com'. This is the root cause for why Drush aliases to sites running on virtualbox / vagrant do not work right.

This PR should probably be enhanced to require that ssh-options does contain -p, but the -p parameter is not -p 22. Is this the right test.