提交 f2c901c9 编写于 作者: J Joao Moreno

build: failsafe

上级 e593908a
......@@ -41,7 +41,11 @@ function log() {
var path = _a[1], line = _a[2], column = _a[3], message = _a[4];
return ({ path: path, line: Number.parseInt(line), column: Number.parseInt(column), message: message });
});
fs.writeFileSync(buildLogPath, JSON.stringify(messages));
try {
fs.writeFileSync(buildLogPath, JSON.stringify(messages));
}
catch (err) {
}
util.log("Finished " + util.colors.green('compilation') + " with " + errors.length + " errors after " + util.colors.magenta((new Date().getTime() - startTime) + ' ms'));
}
function createReporter() {
......
......@@ -50,7 +50,12 @@ function log(): void {
.filter(match => !!match)
.map(([, path, line, column, message]) => ({ path, line: Number.parseInt(line), column: Number.parseInt(column), message }));
fs.writeFileSync(buildLogPath, JSON.stringify(messages));
try {
fs.writeFileSync(buildLogPath, JSON.stringify(messages));
} catch (err) {
//noop
}
util.log(`Finished ${util.colors.green('compilation')} with ${errors.length} errors after ${util.colors.magenta((new Date().getTime() - startTime) + ' ms')}`);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册