function drush_get_runner

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

Decide on which side to run a core-rsync.

Parameters

$source:

$destination:

Return value

mixed

2 calls to drush_get_runner()
drush_config_pull in commands/core/config.drush.inc
Config pull command callback
drush_sqlsync_sql_sync in commands/sql/sqlsync.drush.inc

File

includes/sitealias.inc, line 2277
The site alias API.

Code

function drush_get_runner($source, $destination) {
  // Try run to rsync locally so that aliases always resolve. https://github.com/drush-ops/drush/issues/668
  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;
  }
}