You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
if (!$this->getInspector()->isBehatConfigured()) {
94
-
thrownew\Exception("Behat is not configured properly. Please run `blt doctor` to diagnose the issue.");
93
+
thrownewBltException("Behat is not configured properly. Please run `blt doctor` to diagnose the issue.");
95
94
}
96
95
}
97
96
@@ -103,8 +102,23 @@ public function validateBehatIsConfigured(CommandData $commandData) {
103
102
publicfunctionvalidateMySqlAvailable() {
104
103
if (!$this->getInspector()->isMySqlAvailable()) {
105
104
// @todo Prompt to fix.
106
-
thrownew \Exception("MySql is not available. Please run `blt doctor` to diagnose the issue.");
105
+
thrownewBltException("MySql is not available. Please run `blt doctor` to diagnose the issue.");
106
+
}
107
+
}
108
+
109
+
/**
110
+
* Validates that required settings files exist.
111
+
*
112
+
* @hook validate @validateSettingsFilesPresent
113
+
*/
114
+
publicfunctionvalidateSettingsFilesPresent() {
115
+
if (!$this->getInspector()->isHashSaltPresent()) {
116
+
thrownewBltException("salt.txt is not present. Please run `blt setup:settings` to generate it.");
117
+
}
118
+
if (!$this->getInspector()->isDrupalLocalSettingsFilePresent()) {
119
+
thrownewBltException("Could not find settings.php for this site.");
107
120
}
121
+
// @todo Look for local.drushrc.php.
108
122
}
109
123
110
124
/**
@@ -114,7 +128,7 @@ public function validateMySqlAvailable() {
114
128
*/
115
129
publicfunctionvalidateInsideVm() {
116
130
if ($this->getInspector()->isDrupalVmLocallyInitialized() && !$this->getInspector()->isVmCli()) {
117
-
thrownew\Exception("You must run this command inside Drupal VM, or else do not use Drupal VM at all. Execute `vagrant ssh` and then execute the command, or else change drush.aliases.local in blt/project.local.yml.");
131
+
thrownewBltException("You must run this command inside Drupal VM, or else do not use Drupal VM at all. Execute `vagrant ssh` and then execute the command, or else change drush.aliases.local in blt/project.local.yml.");
0 commit comments