mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 19:26:33 +00:00
Hardcode electron_version in node-pre-gyp patch
Because it is not available in electron when running with ELECTRON_RUN_AS_NODE=1 Change-type: patch
This commit is contained in:
parent
a6661ac759
commit
d4f29bd2af
2
Makefile
2
Makefile
@ -92,7 +92,7 @@ TARGET_ARCH ?= $(HOST_ARCH)
|
|||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
# Electron
|
# Electron
|
||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
patches:
|
patches: node_modules_patches/allow-electron-forks-of-modules-that-use-pre-gyp.patch node_modules/node-pre-gyp/lib/util/versioning.js
|
||||||
# patch from https://github.com/mapbox/node-pre-gyp/pull/279/files , required for lzma-native in electron child processes
|
# patch from https://github.com/mapbox/node-pre-gyp/pull/279/files , required for lzma-native in electron child processes
|
||||||
# we only apply the patch if it hasn't been applied
|
# we only apply the patch if it hasn't been applied
|
||||||
if ! [ -f node_modules/node-pre-gyp/lib/util/versioning.js.orig ]; \
|
if ! [ -f node_modules/node-pre-gyp/lib/util/versioning.js.orig ]; \
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
+ // TODO PR something to electron to pass in the version number for forks
|
+ // TODO PR something to electron to pass in the version number for forks
|
||||||
+ // https://github.com/electron/electron/issues/9058
|
+ // https://github.com/electron/electron/issues/9058
|
||||||
+ try { electron_version = require('electron/package.json').version; }
|
+ try { electron_version = require('electron/package.json').version; }
|
||||||
+ catch (_) {}
|
+ catch (_) { electron_version = '1.7.13'; }
|
||||||
+ }
|
+ }
|
||||||
+ return get_electron_abi(runtime, electron_version);
|
+ return get_electron_abi(runtime, electron_version);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user