Skip to content

Commit 3639dd2

Browse files
authored
add current mongosh version to greeting message (#215)
1 parent 69ae6f2 commit 3639dd2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/cli-repl/src/cli-repl.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class CliRepl {
9696
* @param {NodeOptions} driverOptions - The driver options.
9797
*/
9898
async connect(driverUri: string, driverOptions: NodeOptions): Promise<any> {
99-
console.log(i18n.__(CONNECTING), clr(redactPwd(driverUri), ['bold', 'green']));
99+
console.log(i18n.__(CONNECTING), ' ', clr(redactPwd(driverUri), ['bold', 'green']));
100100
return await CliServiceProvider.connect(driverUri, driverOptions);
101101
}
102102

@@ -336,7 +336,9 @@ class CliRepl {
336336
* The greeting for the shell.
337337
*/
338338
greet(): void {
339-
console.log(`Using MongoDB: ${this.buildInfo.version}`);
339+
const { version } = require('../package.json');
340+
console.log(`Using MongoDB: ${this.buildInfo.version}`);
341+
console.log(`${clr('Using Mongosh Beta', ['bold', 'yellow'])}: ${version}`)
340342
console.log(`${MONGOSH_WIKI}`);
341343
if (!this.disableGreetingMessage) console.log(TELEMETRY);
342344
}

packages/cli-repl/src/logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default function logger(bus: any, logDir: string): void {
6161
const session_id = new ObjectId(Date.now()).toString();
6262
const logDest = path.join(logDir, `${session_id}_log`);
6363
const log = pino({ name: 'monogsh' }, pino.destination(logDest));
64-
console.log(`Current sessionID: ${session_id}`);
64+
console.log(`Current sessionID: ${session_id}`);
6565
let userId;
6666
let telemetry;
6767

0 commit comments

Comments
 (0)