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()
5 calls to _drush_bootstrap_global_options()
drush_command_default_options in includes/
Conditionally include default options based on the command used.
drush_main in ./drush.php
The main Drush function.
_drush_bootstrap_do_drupal_site in includes/
Called by _drush_bootstrap_drupal_site to do the main work of the drush drupal site bootstrap.
_drush_bootstrap_drupal_root in includes/
Bootstrap Drush with a valid Drupal Directory.
_drush_bootstrap_drush in includes/
Initial Drush bootstrap phase.


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


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

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

  // Suppress colored logging if --nocolor option is explicitly given or if
  // terminal does not support it.
  $nocolor = (drush_get_option(array('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);