From 5cffbe66ac6603be39cff076ec30ff3157af5ddc Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Tue, 23 Apr 2019 18:20:19 +0100 Subject: [PATCH] plugin: patch node-pre-gyp libc replacement Adds an instruction to patch the libc name in the binary path configuration for native modules using node-pre-gyp. --- install/hooks/both/after-prepare-patch-npm-packages.js | 1 + 1 file changed, 1 insertion(+) diff --git a/install/hooks/both/after-prepare-patch-npm-packages.js b/install/hooks/both/after-prepare-patch-npm-packages.js index 753c2b8..fd96117 100644 --- a/install/hooks/both/after-prepare-patch-npm-packages.js +++ b/install/hooks/both/after-prepare-patch-npm-packages.js @@ -16,6 +16,7 @@ function patchPackageJSON_preNodeGyp_modulePath(filePath) binaryPathConfiguration = binaryPathConfiguration.replace(/\{platform\}/g, "platform"); binaryPathConfiguration = binaryPathConfiguration.replace(/\{arch\}/g, "arch"); binaryPathConfiguration = binaryPathConfiguration.replace(/\{target_arch\}/g, "target_arch"); + binaryPathConfiguration = binaryPathConfiguration.replace(/\{libc\}/g, "libc"); packageJSON.binary.module_path = binaryPathConfiguration; let packageWriteData = JSON.stringify(packageJSON, null, 2); fs.writeFileSync(filePath, packageWriteData);