Browse Source

Inform user if Desktop client already running

autofill/pm-29288/error-dialog-desktop-already-running
neuronull 2 weeks ago
parent
commit
a3f4a147c7
No known key found for this signature in database
GPG Key ID: 1D2B6B90EFC2031A
  1. 3
      apps/desktop/src/main/window.main.ts

3
apps/desktop/src/main/window.main.ts

@ -4,7 +4,7 @@ import { once } from "node:events"; @@ -4,7 +4,7 @@ import { once } from "node:events";
import * as path from "path";
import * as url from "url";
import { app, BrowserWindow, ipcMain, nativeTheme, screen, session } from "electron";
import { app, BrowserWindow, dialog, ipcMain, nativeTheme, screen, session } from "electron";
import { concatMap, firstValueFrom, pairwise } from "rxjs";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
@ -122,6 +122,7 @@ export class WindowMain { @@ -122,6 +122,7 @@ export class WindowMain {
if (!isMacAppStore()) {
const gotTheLock = app.requestSingleInstanceLock();
if (!gotTheLock) {
dialog.showErrorBox("Error", "An instance of Bitwarden Desktop is already running.");
app.quit();
return;
} else {

Loading…
Cancel
Save