fix(ship-logs): Do not propogate fs errors (Sentry 6144)

This commit is contained in:
Ben Gotow 2015-11-04 16:07:15 -08:00
parent 716b4ec426
commit d0c153590f

View file

@ -49,6 +49,8 @@ module.exports = (dir, regexPattern) ->
detailedLog("Error uploading #{log}: status code #{response.statusCode}")
else
detailedLog("Successfully uploaded #{log}")
fs.truncate log, =>
fs.unlink(log)
fs.truncate log, (err) =>
console.log(err) if err
fs.unlink log, (err) =>
console.log(err) if err
finished()