diff --git a/src/main/electron-app/electron-app.global-override-for-injectable.ts b/src/main/electron-app/electron-app.global-override-for-injectable.ts index ea74c209e1..c7cc065cb2 100644 --- a/src/main/electron-app/electron-app.global-override-for-injectable.ts +++ b/src/main/electron-app/electron-app.global-override-for-injectable.ts @@ -9,4 +9,11 @@ import electronAppInjectable from "./electron-app.injectable"; export default getGlobalOverride(electronAppInjectable, () => ({ getVersion: () => "6.0.0", setLoginItemSettings: () => {}, + commandLine: { + appendArgument: () => {}, + appendSwitch: () => {}, + getSwitchValue: () => "", + hasSwitch: () => false, + removeSwitch: () => {}, + }, } as Partial as Electron.App)); diff --git a/src/main/start-main-application/runnables/setup-hostnames.injectable.ts b/src/main/start-main-application/runnables/setup-hostnames.injectable.ts index bcb08a1bc4..265ff49162 100644 --- a/src/main/start-main-application/runnables/setup-hostnames.injectable.ts +++ b/src/main/start-main-application/runnables/setup-hostnames.injectable.ts @@ -15,7 +15,7 @@ const setupHostnamesInjectable = getInjectable({ return { id: "setup-hostnames", run: () => { - app.commandLine?.appendSwitch("host-rules", [ + app.commandLine.appendSwitch("host-rules", [ "MAP localhost 127.0.0.1", "MAP lens.app 127.0.0.1", "MAP *.lens.app 127.0.0.1",