-
-
Notifications
You must be signed in to change notification settings - Fork 363
Closed
Description
I'd like to get some information on why this is the behavior, or if it's just a bug / oversight. When creating a sql file migration, you end up with code blocks that look like this:
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
if (err) return console.log(err);
console.log('received data: ' + data);
db.runSql(data, function(err) {
if (err) return console.log(err);
callback();
});
});
So in the case of errors you do get a notification, but the process never exits because the callback is skipped over. The easy fix for our team has been to replace return console.log(err); references with return callback(err);, but as a default this doesnt make a lot of sense to me, as it leads to things like hung builds in CI environments. Any chance of changing to return callback(err); for the stubbed-out sql file migrations?