Skip to content

Commit

Permalink
fix: close any instance that does not have the lock
Browse files Browse the repository at this point in the history
  • Loading branch information
JoanVicens authored and miguelsw committed Apr 5, 2024
1 parent b96e514 commit da89c1b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/apps/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ import { setCleanUpFunction } from './quit';
import { stopSyncEngineWatcher } from './background-processes/sync-engine';
import { Theme } from '../shared/types/Theme';

const gotTheLock = app.requestSingleInstanceLock();

if (!gotTheLock) {
app.quit();
}

Logger.log(`Running ${packageJson.version}`);

Logger.log('Initializing Sentry for main process');
Expand Down

0 comments on commit da89c1b

Please sign in to comment.