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 --uri / -l option or the cwd.

1 call to _drush_bootstrap_selected_uri()
_drush_bootstrap_select_drupal_site in includes/bootstrap.inc
Determine which Drupal site will be selected.

File

includes/bootstrap.inc, line 717
Drush bootstrapping code.

Code

function _drush_bootstrap_selected_uri() {
  $uri = drush_get_option('uri');
  if (!isset($uri)) {
    $site_path = drush_site_path();
    $elements = explode('/', $site_path);
    $current = array_pop($elements);
    if (!$current) {
      $current = 'default';
    }
    $uri = 'http://' . $current;
  }

  return $uri;
}