Skip to content

Commit

Permalink
Back out 24addcd; it is important that we set DRUSH_BACKEND in concer…
Browse files Browse the repository at this point in the history
…t with the call to ob_start.
  • Loading branch information
greg-1-anderson committed Nov 8, 2014
1 parent 972dd8a commit cbda1d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion includes/preflight.inc
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ function _drush_preflight_global_options() {
drush_set_context('DRUSH_VERBOSE', drush_get_option(array('verbose', 'debug'), FALSE));
drush_set_context('DRUSH_DEBUG', drush_get_option('debug'));
drush_set_context('DRUSH_SIMULATE', drush_get_option('simulate', FALSE));
drush_set_context('DRUSH_BACKEND', drush_get_option('backend'));

// Backend implies affirmative unless negative is explicitly specified
drush_set_context('DRUSH_NEGATIVE', drush_get_option('no', FALSE));
Expand Down
6 changes: 5 additions & 1 deletion lib/Drush/Boot/bootstrap.inc
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,11 @@ function drush_bootstrap_error($code, $message = null) {
}

function _drush_bootstrap_output_prepare() {
$backend = drush_get_context('DRUSH_BACKEND');
// Note that as soon as we set the DRUSH_BACKEND context, we change
// the behavior of drush_log(). It is therefore important that we
// should not set this context until immediately before we call ob_start
// (i.e., in this function).
$backend = drush_set_context('DRUSH_BACKEND', drush_get_option('backend'));
$quiet = drush_get_context('DRUSH_QUIET');

if ($backend) {
Expand Down

0 comments on commit cbda1d1

Please sign in to comment.