Lazily import Electron from child-writer process

No idea how this *used* to work, but it doesn’t since 887ec428 and this is fixing it properly.

Change-type: patch
This commit is contained in:
Akis Kesoglou 2023-02-01 11:14:18 +02:00
parent 286c74b41b
commit 851219f835

View File

@ -15,7 +15,6 @@
*/
import axios from 'axios';
import { app, remote } from 'electron';
import { Dictionary } from 'lodash';
import * as errors from './errors';
@ -50,6 +49,7 @@ export async function delay(duration: number): Promise<void> {
}
export function getAppPath(): string {
const { app, remote } = require('electron');
return (
(app || remote.app)
.getAppPath()