Revert "enterprise: Quit app after showing error for invalid global config."

This reverts commit 51ff949d34.

It incorrectly uses a main-only API in app/common, which is shared
between the main and renderer processes.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2025-06-20 16:34:04 -07:00
parent 51ff949d34
commit cf5a691a36

View File

@@ -1,4 +1,3 @@
import {app} from "electron/main";
import fs from "node:fs";
import path from "node:path";
import process from "node:process";
@@ -48,11 +47,6 @@ function reloadDatabase(): void {
);
logger.log("Error while JSON parsing global_config.json: ");
logger.log(error);
// This function is called multiple times throughout the
// codebase, making the above dialog.showErrorBox appear
// multiple times and then leading to a non-working app.
// It might be better to quit the app instead.
app.quit();
}
} else {
configFile = false;