Skip to content

Commit

Permalink
chore(compass-main): activate crash reporter for the application COMP…
Browse files Browse the repository at this point in the history
…ASS-7281 (#4931)

chore(compass-main): activate crash reporter for the application
  • Loading branch information
gribnoysup authored Oct 2, 2023
1 parent ba757dc commit 8c769ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/compass/src/main/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// THIS IMPORT SHOULD ALWAYS BE THE FIRST ONE FOR THE APPLICATION ENTRY POINT
import '../setup-hadron-distribution';

import { app, dialog } from 'electron';
import { app, dialog, crashReporter } from 'electron';
import { handleUncaughtException } from './handle-uncaught-exception';
import { initialize as initializeElectronRemote } from '@electron/remote/main';
import {
Expand All @@ -17,6 +17,8 @@ import chalk from 'chalk';
import { installEarlyLoggingListener } from './logging';
import { installEarlyOpenUrlListener } from './window-manager';

crashReporter.start({ uploadToServer: false });

initializeElectronRemote();
installEarlyLoggingListener();
installEarlyOpenUrlListener();
Expand Down
5 changes: 5 additions & 0 deletions packages/compass/src/setup-hadron-distribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,9 @@ if (
// error here
app.setPath('userCache', path.join(app.getPath('cache'), app.getName()));
}

app.setPath(
'crashDumps',
path.join(app.getPath('userData'), 'CrashReporter')
);
}

0 comments on commit 8c769ba

Please sign in to comment.