Remove brew special casing
Brew Formulae support an `auto_updates true` flag which tells brew's auto update
mechanism to stay out of the way.
Ref: https://docs.brew.sh/FAQ#why-arent-some-apps-included-during-brew-upgrade
Will need to open a PR to update our Formula though.
9241d331b6/Casks/e/ente.rb (L9)
This commit is contained in:
parent
5ac4799ce1
commit
95eec1f3d6
2 changed files with 4 additions and 17 deletions
|
@ -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);
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue