Friendlier error message for missing media_folder
This commit is contained in:
parent
a440b370ea
commit
6194e969f5
@ -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', () => {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user