allow empty config file

This commit is contained in:
AJ ONeal 2017-05-08 17:01:59 -06:00
parent 1bdcd73d28
commit dad2e66f52
1 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,10 @@ function readConfigAndRun(args) {
} catch(e) {
try {
config = require('js-yaml').safeLoad(text);
// blank config file
if ('undefined' === typeof config) {
config = {};
}
} catch(e) {
throw new Error(
"Could not load '" + filename + "' as JSON nor YAML"