function drush_COMMAND_init

8.0.x drush.api.php drush_COMMAND_init()
6.x drush.api.php drush_COMMAND_init()
7.x drush.api.php drush_COMMAND_init()
4.x drush.api.php drush_COMMAND_init()
5.x drush.api.php drush_COMMAND_init()
master drush.api.php drush_COMMAND_init()

Initialize a command prior to validation. If a command needs to bootstrap to a higher level, this is best done in the command init hook. It is permisible to bootstrap in any hook, but note that if bootstrapping adds more commandfiles (*.drush.inc) to the commandfile list, the newly-added commandfiles will not have any hooks called until the next phase. For example, a command that calls drush_bootstrap_max() in drush_hook_COMMAND() would only permit commandfiles from modules enabled in the site to participate in drush_hook_post_COMMAND() hooks.

File

docs/drush.api.php, line 108
Documentation of the Drush API.

Code

function drush_COMMAND_init() {
  drush_bootstrap_max();
}