assume that non-JavaScript config files are in JSON format (#1391)

This commit is contained in:
Jeff Williams 2017-07-10 11:12:14 -07:00
parent 510e890ae8
commit 3bd92630e5

4
cli.js
View File

@ -93,11 +93,9 @@ cli.loadConfig = function() {
break;
case '.json':
case '.EXAMPLE':
default:
config = fs.readFileSync(confPath, 'utf8');
break;
default:
cli.exit(1, 'Cannot use config file ' + confPath + '. Only .js and .json files ' +
'are supported.\n' + FATAL_ERROR_MESSAGE);
}
env.conf = new Config(config).get();
}