function _drush_bootstrap_global_options

6.x _drush_bootstrap_global_options()
3.x _drush_bootstrap_global_options()
4.x _drush_bootstrap_global_options()
5.x _drush_bootstrap_global_options()
7 calls to _drush_bootstrap_global_options()
drush_command_set_command_specific in includes/
drush_main in ./drush.php
The main Drush function.
drush_preflight_command_dispatch in includes/
Handle any command preprocessing that may need to be done, including potentially redispatching the command immediately (e.g. for remote commands).
drush_shell_alias_replace in includes/
Check if a shell alias exists for current request. If so, re-route to core-execute and pass alias value along with rest of CLI arguments.
_drush_bootstrap_do_drupal_site in includes/
Called by _drush_bootstrap_drupal_site to do the main work of the drush drupal site bootstrap.

... See full list


includes/, line 628
Drush bootstrapping code.


function _drush_bootstrap_global_options() {
  // Debug implies verbose
  drush_set_context('DRUSH_VERBOSE', drush_get_option(array('verbose', 'debug'), FALSE));
  drush_set_context('DRUSH_DEBUG', drush_get_option('debug'));

  // Backend implies affirmative unless negative is explicitly specified
  drush_set_context('DRUSH_NEGATIVE', drush_get_option('no', FALSE));
  drush_set_context('DRUSH_AFFIRMATIVE', drush_get_option(array('yes', 'pipe'), FALSE) || (drush_get_context('DRUSH_BACKEND') && !drush_get_context('DRUSH_NEGATIVE')));
  drush_set_context('DRUSH_SIMULATE', drush_get_option('simulate', FALSE));

  // Suppress colored logging if --nocolor option is explicitly given or if
  // terminal does not support it.
  $nocolor = (drush_get_option('nocolor', FALSE));
  if (!$nocolor) {
    // Check for colorless terminal.  If there is no terminal, then
    // 'tput colors 2>&1' will return "tput: No value for $TERM and no -T specified",
    // which is not numeric and therefore will put us in no-color mode.
    $colors = exec('tput colors 2>&1');
    $nocolor = !($colors === FALSE || (is_numeric($colors) && $colors >= 3));
  drush_set_context('DRUSH_NOCOLOR', $nocolor);