Commit b727cb00 authored by Isabella Skořepová's avatar Isabella Skořepová

Dont make config.toml mandatory

Fixes #38
parent e432921a
Pipeline #190 passed with stages
......@@ -45,9 +45,13 @@ module.exports = function() {
};
var configFile = path.join(config.sourceDir, 'config.toml');
fs.readFile(configFile,'utf-8',function(err,data) {
if(err) return reject('Error reading '+configFile);
if(err) {
console.log('Failed to read configuration from '+configFile);
console.log('Using defaults')
return resolve({config: config});
}
data = toml.parse(data);
console.log(data);
console.log('data: '+data);
for(let attr in config) { data[attr] = config[attr]; }
resolve({config: data});
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment