Fix oputil hang

This commit is contained in:
Bryan Ashby 2018-06-17 15:14:31 -06:00
parent c9674e68fb
commit f3cd36ad07
3 changed files with 28 additions and 21 deletions

View file

@ -100,7 +100,14 @@ function init(configPath, options, cb) {
};
const ConfigCache = require('./config_cache.js');
ConfigCache.getConfigWithOptions( { filePath : configPath, callback : changed }, (err, config) => {
const getConfigOptions = {
filePath : configPath,
noWatch : options.noWatch,
};
if(!options.noWatch) {
getConfigOptions.callback = changed;
}
ConfigCache.getConfigWithOptions(getConfigOptions, (err, config) => {
if(err) {
return cb(err);
}