function drush_sitealias_check_site_env

8.0.x drush_sitealias_check_site_env()
6.x drush_sitealias_check_site_env()
7.x drush_sitealias_check_site_env()
5.x drush_sitealias_check_site_env()
master drush_sitealias_check_site_env()
1 call to drush_sitealias_check_site_env()
drush_complete_process_argv in includes/
This function resets the raw arguments so that Drush can parse the command as if it was run directly. The shell complete command passes the full command line as an argument, and the --early and --complete-debug options have to come before that, and…


includes/, line 74
The site alias API.


function drush_sitealias_check_site_env() {
  $site = drush_get_context('DRUSH_TARGET_SITE_ALIAS');
  if (empty($site)) {
    $site_env = drush_sitealias_site_get();
    if (!empty($site_env) && (_drush_sitealias_set_context_by_name($site_env))) {
      drush_set_context('DRUSH_TARGET_SITE_ALIAS', $site_env);
      return TRUE;
  // Return false to indicate that no site alias was specified.
  return FALSE;