Improved status detection

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 11 years ago
parent 19b63321dd
commit 2c4db660cf
  1. 6
      BuildServer/routes/status.js

@ -55,10 +55,14 @@ var loadReport = function (app, options, callback) {
return callback("ReportFileNotFound", options);
}
fs.readFile(reportFile, function (err, data) {
fs.readFile(reportFile, function (err, dataBuffer) {
if (err) {
return callback(err, options);
}
var data = dataBuffer.toString();
if (!data) {
return callback("ReportFileNotFound", options);
}
options.report = JSON.parse(data);
return callback(null, options);
});

Loading…
Cancel
Save