function drush_bootstrap_max

8.0.x bootstrap.inc drush_bootstrap_max($max_phase_index = FALSE)
6.x bootstrap.inc drush_bootstrap_max($max_phase_index = FALSE)
7.x bootstrap.inc drush_bootstrap_max($max_phase_index = FALSE)
3.x environment.inc drush_bootstrap_max()
4.x environment.inc drush_bootstrap_max($max_phase_index = FALSE)
5.x bootstrap.inc drush_bootstrap_max($max_phase_index = FALSE)
master bootstrap.inc drush_bootstrap_max($max_phase_index = FALSE)

Bootstrap to the highest level possible, without triggering any errors.

5 calls to drush_bootstrap_max()
drush_core_cli in commands/core/core.drush.inc
drush_core_status in commands/core/core.drush.inc
Command callback. Provides a birds-eye view of the current Drupal installation.
drush_pm_download in commands/pm/pm.drush.inc
Command callback. Download Drupal core or any project.
drush_sitealias_evaluate_path in includes/sitealias.inc
Evaluate a path from its shorthand form to a literal path usable by rsync.
drush_sitealias_print in commands/core/sitealias.drush.inc
Print out the specified site aliases using the format specified.

File

includes/environment.inc, line 243
Functions used by drush to query the environment and setting the current configuration.

Code

function drush_bootstrap_max() {
  $phases = _drush_bootstrap_phases();
  $phase_index = DRUSH_BOOTSTRAP_DRUSH;

  // Try to bootstrap to the maximum possible level, without generating errors
  foreach ($phases as $phase_index) {
    if (drush_bootstrap_validate($phase_index)) {
      if ($phase_index > drush_get_context('DRUSH_BOOTSTRAP_PHASE')) {
        drush_bootstrap($phase_index);
      }
    }
    else {
      break;
    }
  }

  return $phase_index;
}