Merge pull request #1090 from CartoDB/graceful-shutdown
Use semver for cheking dependencies version
This commit is contained in:
commit
4ffbcea819
@ -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…
Reference in New Issue
Block a user