Skip to content

Commit

Permalink
Adding check for blt.settings.php in factory hooks to doctor. (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash authored Sep 20, 2016
1 parent d2ac989 commit c6fba13
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Drush/Command/BltDoctorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ public function checkAll() {
$this->checkComposerConfig();
$this->checkBehatConfig();
$this->checkProjectYml();
$this->checkAcsfConfig();

// @todo Check error_level.
// @todo Check if theme dependencies have been built.
Expand Down Expand Up @@ -201,6 +202,9 @@ protected function checkSettingsFile() {
drush_log("BLT settings are included in settings file:", 'success');
drush_print($settings_file_path, 2);
}
else {
drush_set_error("BLT settings are not included in your settings file.");
}
if (strstr($settings_file_contents, '/sites/default/settings/blt.settings.php')) {
drush_set_error("Your settings file contains a deprecated statement for including BLT settings.");
drush_print("Please remove the line containing \"/sites/default/settings/blt.settings.php\" in $settings_file_path.", 2);
Expand Down Expand Up @@ -547,6 +551,17 @@ protected function checkComposerConfig() {
}
}

protected function checkAcsfConfig() {
$file_path = $this->repoRoot . '/factory-hooks/pre-settings-php/includes.php';
if (file_exists($file_path)) {
$file_contents = file_get_contents($file_path);
if (!strstr($file_contents, '/../vendor/acquia/blt/settings/blt.settings.php')) {
drush_set_error("BLT settings are not included in your pre-settings-php include.");
drush_print("Add a require statement for \"/../vendor/acquia/blt/settings/blt.settings.php\" to $file_path", 2);
}
}
}

/**
* Checks that caching is configured for local development.
*/
Expand Down

0 comments on commit c6fba13

Please sign in to comment.