Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Remove brew special casing

Manav Rathi95eec1f3d63e
diff --git a/desktop/src/main.ts b/desktop/src/main.ts
index 505d5f1cc2..dc27c7435a 100644
--- a/desktop/src/main.ts
+++ b/desktop/src/main.ts
@@ -19,7 +19,6 @@ import {
handleDockIconHideOnAutoLaunch,
handleDownloads,
handleExternalLinks,
- handleUpdates,
logStartupBanner,
setupMacWindowOnDockIconClick,
setupMainMenu,
@@ -27,6 +26,8 @@ import {
} from "./main/init";
import { attachFSWatchIPCHandlers, attachIPCHandlers } from "./main/ipc";
import log, { initLogging } from "./main/log";
+import { isDev } from "./main/util";
+import { setupAutoUpdater } from "./services/appUpdater";
import { initWatcher } from "./services/chokidar";
let appIsQuitting = false;
@@ -170,7 +171,7 @@ const main = () => {
setupMainMenu(mainWindow);
attachIPCHandlers();
attachFSWatchIPCHandlers(watcher);
- await handleUpdates(mainWindow);
+ if (!isDev) setupAutoUpdater(mainWindow);
handleDownloads(mainWindow);
handleExternalLinks(mainWindow);
addAllowOriginHeader(mainWindow);
diff --git a/desktop/src/main/init.ts b/desktop/src/main/init.ts
index df4363bace..270609bf74 100644
--- a/desktop/src/main/init.ts
+++ b/desktop/src/main/init.ts
@@ -9,7 +9,7 @@ import { getHideDockIconPreference } from "../services/userPreference";
import { isPlatform } from "../utils/common/platform";
import { buildContextMenu, buildMenuBar } from "../utils/menu";
import log from "./log";
-import { execAsync, isDev } from "./util";
+import { isDev } from "./util";
/**
* Create an return the {@link BrowserWindow} that will form our app's UI.
@@ -79,10 +79,6 @@ export const createWindow = async () => {
};
export async function handleUpdates(mainWindow: BrowserWindow) {
- const isInstalledViaBrew = await checkIfInstalledViaBrew();
- if (!isDev && !isInstalledViaBrew) {
- setupAutoUpdater(mainWindow);
- }
}
export const setupTrayItem = (mainWindow: BrowserWindow) => {
@@ -170,16 +166,6 @@ export function logStartupBanner() {
log.debug(() => ({ platform, osRelease, systemVersion }));
}
-async function checkIfInstalledViaBrew() {
- if (process.platform != "darwin") return false;
- try {
- await execAsync("brew list --cask ente");
- return true;
- } catch (e) {
- return false;
- }
-}
-
function lowerCaseHeaders(responseHeaders: Record<string, string[]>) {
const headers: Record<string, string[]> = {};
for (const key of Object.keys(responseHeaders)) {