From da86a399a92042b5dd205d3694282de2cab7fee7 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 21 Sep 2023 12:16:47 +0200 Subject: [PATCH] fixup: leave unchanged code as-is --- packages/cli-repl/src/mongosh-repl.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/cli-repl/src/mongosh-repl.ts b/packages/cli-repl/src/mongosh-repl.ts index c72bb8cc7..d094098c4 100644 --- a/packages/cli-repl/src/mongosh-repl.ts +++ b/packages/cli-repl/src/mongosh-repl.ts @@ -177,13 +177,11 @@ class MongoshNodeRepl implements EvaluationListener { let mongodVersion = extraInfo?.is_stream ? 'Atlas Stream Processing' : buildInfo?.version; - if (!extraInfo?.is_stream) { - const apiVersion = serviceProvider.getRawClient()?.serverApi?.version; - if (apiVersion) { - mongodVersion = - (mongodVersion ? mongodVersion + ' ' : '') + - `(API Version ${apiVersion})`; - } + const apiVersion = serviceProvider.getRawClient()?.serverApi?.version; + if (apiVersion) { + mongodVersion = + (mongodVersion ? mongodVersion + ' ' : '') + + `(API Version ${apiVersion})`; } await this.greet(mongodVersion, moreRecentMongoshVersion); await this.printBasicConnectivityWarning(instanceState); @@ -461,7 +459,7 @@ class MongoshNodeRepl implements EvaluationListener { * The greeting for the shell, showing server and shell version. */ async greet( - mongodVersion?: string, + mongodVersion: string, moreRecentMongoshVersion?: string | null ): Promise { if (this.shellCliOptions.quiet) { @@ -469,7 +467,7 @@ class MongoshNodeRepl implements EvaluationListener { } const { version } = require('../package.json'); let text = ''; - if (mongodVersion && !this.shellCliOptions.nodb) { + if (!this.shellCliOptions.nodb) { text += `Using MongoDB:\t\t${mongodVersion}\n`; } text += `${this.clr(