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:
Alexis Svinartchouk 2019-01-28 13:07:38 +01:00
parent a6661ac759
commit d4f29bd2af
2 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ TARGET_ARCH ?= $(HOST_ARCH)
# ---------------------------------------------------------------------
# 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
# we only apply the patch if it hasn't been applied
if ! [ -f node_modules/node-pre-gyp/lib/util/versioning.js.orig ]; \

View File

@ -10,7 +10,7 @@
+ // TODO PR something to electron to pass in the version number for forks
+ // https://github.com/electron/electron/issues/9058
+ try { electron_version = require('electron/package.json').version; }
+ catch (_) {}
+ catch (_) { electron_version = '1.7.13'; }
+ }
+ return get_electron_abi(runtime, electron_version);
} else {