function drush_get_runner

8.0.x drush_get_runner($source, $destination)
master drush_get_runner($source, $destination, $runner = FALSE)

Decide on which side to run a core-rsync.




Return value


2 calls to drush_get_runner()
drush_config_pull in commands/core/
Config pull command callback
drush_sqlsync_sql_sync in commands/sql/


includes/, line 2277
The site alias API.


function drush_get_runner($source, $destination) {
  // Try run to rsync locally so that aliases always resolve.
  if (drush_sitealias_is_remote_site($source) === FALSE) {
    $runner = $source;
    return $runner;
  elseif (drush_sitealias_is_remote_site($destination) === FALSE) {
    $runner = $destination;
    return $runner;
  else {
    // Both are remote. Arbitrarily run rsync on destination. Aliases must be defined there (for now).
    // @todo Add an option for choosing runner? Resolve aliases before rsync?
    $runner = $destination;
    return $runner;