0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-15 03:01:37 -05:00

More verbose error message for invalid JSON in config.js

if you enter an invalid json object such as:
```
{
server: "http://foo.com"
host: "0.0.0.0"
}
```
while configuring, you get errors but are still able to run forever and the message previously was not as indicative of other potential configuration problems.
This commit is contained in:
enahs 2013-10-21 23:38:41 -07:00 committed by Hannah Wolfe
parent 12c7f30076
commit dddf2ec5b2

View file

@ -57,7 +57,8 @@ function validateConfigEnvironment() {
// Check if we don't even have a config
if (!config) {
errors.logError(new Error('Cannot find the configuration for the current NODE_ENV'), "NODE_ENV=" + envVal, 'Ensure your config.js has a section for the current NODE_ENV value');
errors.logError(new Error('Cannot find the configuration for the current NODE_ENV'), "NODE_ENV=" + envVal,
'Ensure your config.js has a section for the current NODE_ENV value and is formatted properly.');
return when.reject();
}