mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Version check no meta (#1243)
* Version check on module loading - remove all metadata information bevor comparing the versions. * refined regex
This commit is contained in:
parent
48958f392f
commit
0ee7ffb5e5
@ -116,7 +116,7 @@ function loadNodeFiles(nodeFiles) {
|
||||
/* istanbul ignore else */
|
||||
if (nodeFiles.hasOwnProperty(module)) {
|
||||
if (nodeFiles[module].redVersion &&
|
||||
!semver.satisfies(runtime.version().replace("-git",""), nodeFiles[module].redVersion)) {
|
||||
!semver.satisfies(runtime.version().replace(/(\-[1-9A-Za-z-][0-9A-Za-z-\.]*)?(\+[0-9A-Za-z-\.]+)?$/,""), nodeFiles[module].redVersion)) {
|
||||
//TODO: log it
|
||||
runtime.log.warn("["+module+"] "+runtime.log._("server.node-version-mismatch",{version:nodeFiles[module].redVersion}));
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user