Friendlier error message for missing media_folder

This commit is contained in:
Cássio Zen 2016-11-29 16:16:56 -02:00
parent a440b370ea
commit 6194e969f5
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ describe('config', () => {
it('should throw if media_folder is not defined in config', () => {
expect(() => {
config.applyDefaults({ foo: 'bar' });
}).toThrowError('Config: `media_folder` setting could not be found in config.');
}).toThrowError('Error in configuration file: A `media_folder` wasn\'t found. Check your config.yml file.');
});
it('should set publish_mode if not set', () => {

View File

@ -15,7 +15,7 @@ const defaults = {
export function applyDefaults(config) {
if (!('media_folder' in config)) {
throw new Error('Config: `media_folder` setting could not be found in config.');
throw new Error('Error in configuration file: A `media_folder` wasn\'t found. Check your config.yml file.');
}
// Make sure there is a public folder