drush_do_command_redispatch

Versions
6
drush_do_command_redispatch($command, $args = array(), $remote_host = NULL, $remote_user = NULL, $drush_path = NULL)

Redispatch the specified command using the same options that were passed to this invocation of drush.

Related topics

▾ 3 functions call drush_do_command_redispatch()

drush_remote_command in contrib-6/drush/includes/drush.inc
Process commands that are executed on a remote drush instance.
drush_sql_sync in contrib-6/drush/commands/sql/sync.sql.inc
drush_topic in contrib-6/drush/commands/core/topic.drush.inc
A command callback.

Code

contrib-6/drush/includes/drush.inc, line 1301

<?php
function drush_do_command_redispatch($command, $args = array(), $remote_host = NULL, $remote_user = NULL, $drush_path = NULL) {
  $data = drush_redispatch_get_options();

  // If the path to drush was supplied, then pass it to backend invoke.
  if ($drush_path == NULL) {
    $drush_path = drush_get_option('drush-script');
    if (!isset($drush_path)) {
      $drush_folder = drush_get_option('drush');
      if (isset($drush)) {
        $drush_path = $drush_folder . '/drush';
      }
    }
  }
  // Call through to backend invoke.
  drush_log(dt('Begin redispatch via backend invoke'));
  $values = drush_backend_invoke_args($command, $args, $data, 'GET', TRUE, $drush_path, $remote_host, $remote_user);
  drush_log(dt('Backend invoke is complete'));

  return $values;
}
?>

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options