Remove fs.writeFileSync(2) to avoid crashing on Windows

This commit is contained in:
Yuya Ochiai
2017-11-05 21:02:15 +09:00
parent 19ced85bc8
commit f794ac729e

View File

@@ -57,7 +57,6 @@ class CriticalErrorHandler {
const file = path.join(app.getPath('userData'), `uncaughtException-${Date.now()}.txt`);
const report = createErrorReport(err);
fs.writeFileSync(file, report.replace(new RegExp('\\n', 'g'), os.EOL));
fs.writeSync(2, `See "${file}" to report the problem.\n`);
if (app.isReady()) {
const showMessageBox = bindWindowToShowMessageBox(this.mainWindow);