function _drush_bootstrap_selected_uri

8.0.x bootstrap.inc _drush_bootstrap_selected_uri()
6.x bootstrap.inc _drush_bootstrap_selected_uri()
7.x bootstrap.inc _drush_bootstrap_selected_uri()
5.x bootstrap.inc _drush_bootstrap_selected_uri()
master bootstrap.inc _drush_bootstrap_selected_uri()

Find the URI that has been selected by the cwd if it was not previously set via the --uri / -l option

2 calls to _drush_bootstrap_selected_uri()
DrupalBoot::bootstrap_drupal_site_validate in lib/Drush/Boot/DrupalBoot.php
VALIDATE the DRUSH_BOOTSTRAP_DRUPAL_SITE phase.
drush_core_pre_site_install in commands/core/site_install.drush.inc
Perform setup tasks for installation.

File

includes/bootstrap.inc, line 249

Code

function _drush_bootstrap_selected_uri() {
  $uri = drush_get_context('DRUSH_SELECTED_URI');
  if (empty($uri)) {
    $site_path = drush_site_path();
    $elements = explode('/', $site_path);
    $current = array_pop($elements);
    if (!$current) {
      $current = 'default';
    }
    $uri = 'http://' . $current;
    $uri = drush_set_context('DRUSH_SELECTED_URI', $uri);
    drush_sitealias_create_self_alias();
  }

  return $uri;
}