mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 19:26:33 +00:00
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:
parent
286c74b41b
commit
851219f835
@ -15,7 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { app, remote } from 'electron';
|
|
||||||
import { Dictionary } from 'lodash';
|
import { Dictionary } from 'lodash';
|
||||||
|
|
||||||
import * as errors from './errors';
|
import * as errors from './errors';
|
||||||
@ -50,6 +49,7 @@ export async function delay(duration: number): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getAppPath(): string {
|
export function getAppPath(): string {
|
||||||
|
const { app, remote } = require('electron');
|
||||||
return (
|
return (
|
||||||
(app || remote.app)
|
(app || remote.app)
|
||||||
.getAppPath()
|
.getAppPath()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user