The Drush 'provision-update' command in the 'provision_tasks_extra.drush.inc' file currently has its bootstrap level set to DRUSH_BOOTSTRAP_DRUSH. When using this command, our users have found that the 'drush_provision_tasks_extra_provision_update_pre_validate()' and 'drush_provision_tasks_extra_post_provision_update()' functions that are used by the command lead to the eventual calling of code within the 'provision/Provision/Config/Drupal/Settings.php' file that, when trying to determine the Drupal version of the currently bootstrapped site, comes up with a FALSE value and defaults to Drupal version 6. This causes the site's 'settings.php' file to be re-built for Drupal 6, regardless of the actual version that the site is running under, corrupting the 'settings.php' file.

Setting the 'provision-update' command's bootstrap level to DRUSH_BOOTSTRAP_DRUPAL_FULL fixes this, with the correct version of Drupal being detected.

The attached patch makes this change.

Comments

kfolsom created an issue. See original summary.

kfolsom’s picture

colan’s picture

Status: Active » Needs review
helmo’s picture

Thanks, doing a full bootstrap might be a bit much here though.

Looking at the Drush code it seems like DRUSH_BOOTSTRAP_DRUPAL_ROOT would be enough. Could you verify that?

kfolsom’s picture

StatusFileSize
new585 bytes

Using DRUSH_BOOTSTRAP_DRUPAL_ROOT does indeed work. I've updated the patch with this change and have attached it.

  • helmo committed 4d4d22a on 7.x-3.x authored by kfolsom
    Issue #2879209 by kfolsom: Bootstrap Level of 'provision-update' Command...
helmo’s picture

Status: Needs review » Fixed

Thanks, committed.

helmo’s picture

Title: Bootstrap Level of 'provision-update' Command Changed to DRUSH_BOOTSTRAP_DRUPAL_FULL » Bootstrap Level of 'provision-update' Command Changed to DRUSH_BOOTSTRAP_DRUPAL_ROOT

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.