Skip to content

Commit

Permalink
change startup verification for mongo db
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Apr 11, 2024
1 parent 1ae6c13 commit 572bae4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/meteor/server/startup/serverRunning.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ Meteor.startup(async () => {
exitIfNotBypassed(process.env.BYPASS_NODEJS_VALIDATION);
}

if (!semver.satisfies(semver.coerce(mongoVersion), '>=4.4.0')) {
msg += ['', '', 'YOUR CURRENT MONGODB VERSION IS NOT SUPPORTED,', 'PLEASE UPGRADE TO VERSION 4.4 OR LATER'].join('\n');
if (semver.satisfies(semver.coerce(mongoVersion), '<5.0.0')) {
msg += ['', '', 'YOUR CURRENT MONGODB VERSION IS NOT SUPPORTED,', 'PLEASE UPGRADE TO VERSION 5.0 OR LATER'].join('\n');
showErrorBox('SERVER ERROR', msg);

exitIfNotBypassed(process.env.BYPASS_MONGO_VALIDATION);
Expand All @@ -88,11 +88,11 @@ Meteor.startup(async () => {
showSuccessBox('SERVER RUNNING', msg);

// Deprecation
if (!skipMongoDbDeprecationCheck && !semver.satisfies(semver.coerce(mongoVersion), '>=5.0.0')) {
if (!skipMongoDbDeprecationCheck && semver.satisfies(semver.coerce(mongoVersion), '<6.0.0')) {
msg = [
`YOUR CURRENT MONGODB VERSION (${mongoVersion}) IS DEPRECATED.`,
'IT WILL NOT BE SUPPORTED ON ROCKET.CHAT VERSION 7.0.0 AND GREATER,',
'PLEASE UPGRADE MONGODB TO VERSION 5.0 OR GREATER',
'PLEASE UPGRADE MONGODB TO VERSION 6.0 OR GREATER',
].join('\n');
showWarningBox('DEPRECATION', msg);

Expand Down

0 comments on commit 572bae4

Please sign in to comment.