1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fix electronAppInjectable override

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2023-01-04 12:31:12 +02:00
parent b3a8ad362d
commit 0af39fad3d
2 changed files with 8 additions and 1 deletions

View File

@ -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<Electron.App> as Electron.App));

View File

@ -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",