Merge pull request #1090 from CartoDB/graceful-shutdown

Use semver for cheking dependencies version
remotes/origin/fix-typo-patch-1
Daniel G. Aubert 6 years ago committed by GitHub
commit 4ffbcea819
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save