From 6808ab496ac064c5cbb73caa631ea160def8aeee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Fri, 29 Mar 2019 15:30:29 +0100 Subject: [PATCH] Use semver for cheking dependencies version --- lib/cartodb/server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cartodb/server.js b/lib/cartodb/server.js index 3e1b3c4c..ad998ef9 100644 --- a/lib/cartodb/server.js +++ b/lib/cartodb/server.js @@ -1,6 +1,7 @@ 'use strict'; const _ = require('underscore'); +const semver = require('semver'); const express = require('express'); const windshaft = require('windshaft'); const { mapnik } = windshaft; @@ -82,7 +83,7 @@ function getAndValidateVersions(options) { dependenciesToValidate.forEach(function(depName) { var declaredDependencyVersion = declaredDependencies[depName]; var installedDependencyVersion = installedDependenciesVersions[depName]; - if (declaredDependencyVersion !== installedDependencyVersion) { + if (!semver.satisfies(installedDependencyVersion,declaredDependencyVersion)) { warn( 'Dependency="%s" installed version="%s" does not match declared version="%s". Check your installation.', depName, installedDependencyVersion, declaredDependencyVersion