You are here

function hosting_queued_drush_find_drush in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 queued/hosting_queued.drush.inc \hosting_queued_drush_find_drush()
  2. 7.3 queued/hosting_queued.drush.inc \hosting_queued_drush_find_drush()

Get the proper way to call drush again.

Note that unlike drush_find_drush() we return an array of parts, and we trim the 'php' option of extra single quotes.

See also

drush_find_drush()

File

queued/hosting_queued.drush.inc, line 192
Dispatcher daemon

Code

function hosting_queued_drush_find_drush() {
  $php = drush_get_option('php');
  if (isset($php)) {
    $php = trim($php, "'");
    $drush = array(
      $php,
      realpath($_SERVER['argv'][0]),
      "--php='{$php}'",
    );
  }
  else {
    $drush = array(
      realpath($_SERVER['argv']['0']),
    );
  }
  return $drush;
}