allow empty config file
This commit is contained in:
parent
1bdcd73d28
commit
dad2e66f52
|
@ -56,6 +56,10 @@ function readConfigAndRun(args) {
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
try {
|
try {
|
||||||
config = require('js-yaml').safeLoad(text);
|
config = require('js-yaml').safeLoad(text);
|
||||||
|
// blank config file
|
||||||
|
if ('undefined' === typeof config) {
|
||||||
|
config = {};
|
||||||
|
}
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"Could not load '" + filename + "' as JSON nor YAML"
|
"Could not load '" + filename + "' as JSON nor YAML"
|
||||||
|
|
Loading…
Reference in New Issue