Skip to content

Commit 3c31920

Browse files
authored
exclude NODE_EMBEDDER_MODULE_VERSION string (#23)
When extracting the module version from `src/node_version.h`, ignore the line: #define NODE_MODULE_VERSION NODE_EMBEDDER_MODULE_VERSION This will pick up the default value from the header as the official Node.js builds do not define `NODE_EMBEDDER_MODULE_VERSION`. Fixes: #20 Refs: nodejs/node#49279
1 parent 860a8b4 commit 3c31920

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dist-indexer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ function fetchModVersion (gitref, callback) {
325325
return callback(err)
326326
}
327327

328-
let m = rawData.match(/^#define NODE_MODULE_VERSION\s+([^\s]+)\s+.+$/m)
328+
let m = rawData.match(/^#define NODE_MODULE_VERSION\s+((?!NODE_EMBEDDER_MODULE_VERSION)[^\s]+)\s+.+$/m)
329329
version = m && m[1]
330330

331331
if (version) {

0 commit comments

Comments
 (0)