function drush_enforce_requirement_bootstrap_phase

8.0.x drush_enforce_requirement_bootstrap_phase(&$command)
6.x drush_enforce_requirement_bootstrap_phase(&$command)
7.x drush_enforce_requirement_bootstrap_phase(&$command)
3.x drush_enforce_requirement_bootstrap_phase(&$command)
4.x drush_enforce_requirement_bootstrap_phase(&$command)
5.x drush_enforce_requirement_bootstrap_phase(&$command)
master drush_enforce_requirement_bootstrap_phase(&$command)

Check that a command is valid for the current bootstrap phase.


$command: Command to check. Any errors will be added to the 'bootstrap_errors' element.

Return value

TRUE if command is valid.

1 call to drush_enforce_requirement_bootstrap_phase()


includes/, line 1744
The drush command engine.


function drush_enforce_requirement_bootstrap_phase(&$command) {
  $valid = array();
  $current_phase = drush_get_context('DRUSH_BOOTSTRAP_PHASE');
  if ($command['bootstrap'] <= $current_phase) {
    return TRUE;
  // TODO: provide description text for each bootstrap level so we can give
  // the user something more helpful and specific here.
  $command['bootstrap_errors']['DRUSH_COMMAND_INSUFFICIENT_BOOTSTRAP'] = dt('Command !command needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.', array('!command' => $command['command']));