Skip to content

Instantly share code, notes, and snippets.

@omega8cc
Created February 22, 2016 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omega8cc/a1b480818965aa2ed3f0 to your computer and use it in GitHub Desktop.
Save omega8cc/a1b480818965aa2ed3f0 to your computer and use it in GitHub Desktop.
/**
* Provision verify command
*
* Disable an enabled and installed site
*/
function drush_provision_drupal_provision_verify_validate() {
if (d()->type === 'site') {
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_SITE);
provision_prepare_environment();
_provision_drupal_create_settings_file();
provision_drupal_push_site();
drush_errors_on();
$rrFile = d()->root . '/sites/all/modules/registry-rebuild.ini';
if (provision_file()->exists($rrFile)->status()) {
if (drush_drupal_major_version() < 8 && d()->profile != 'hostmaster') {
provision_backend_invoke(d()->name, 'registry-rebuild');
drush_log(dt('Completed registry-rebuild without --no-cache-clear option'));
}
}
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_FULL);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment