function drush_sitealias_check_arg

8.0.x drush_sitealias_check_arg()
6.x drush_sitealias_check_arg()
7.x drush_sitealias_check_arg()
3.x drush_sitealias_check_arg()
4.x drush_sitealias_check_arg()
5.x drush_sitealias_check_arg()
master drush_sitealias_check_arg()

Check to see if the first command-line arg or the -l option is a site alias; if it is, copy its record values to the 'alias' context.

Return value

boolean TRUE if a site alias was found and processed.

2 calls to drush_sitealias_check_arg()
_drush_bootstrap_drush in includes/
Initial Drush bootstrap phase.
_drush_bootstrap_redo_drupal_site in includes/
Re-do the drupal site bootstrap (and possibly the drupal root bootstrap) if a site alias was processed after the site bootstrap phase completed. This will happen when processing "drush sitealias command" for a site alias defined in a…


includes/, line 20
The site alias API.


function drush_sitealias_check_arg() {
  $args = drush_get_arguments();

  // Test to see if the first arg is a site specification
  if (_drush_sitealias_set_context_by_name($args[0])) {
    // We only need to expand the site specification
    // once, then we are done.
    return TRUE;

  // Return false to indicate that no site alias was specified.
  return FALSE;